/* AlloDentiste Header Info Bar Widget Styles */

/* Full width breakout for Elementor containers */
.elementor-widget-allo-header-info-bar {
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: none !important;
    box-sizing: border-box;
}

.allo-header-info-bar-widget {
    width: 100%;
    position: relative;
}

.allo-header-info-bar-widget.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-info-bar {
    background-color: #333333;
    color: #FFFFFF;
    padding: 12px 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Left Section - Language Switcher */
.header-left {
    display: flex;
    align-items: center;
}

.header-info-language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-info-language-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
}

.header-info-language-option:hover {
    opacity: 0.8;
    color: #FFFFFF;
}

.header-info-language-option.active {
    color: #00A1AD !important;
}

.header-info-language-option .header-info-flag {
    width: 20px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 2px;
}

.header-info-language-option .header-info-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Checkmark badge on active language flag */
.header-info-language-option.active .header-info-flag {
    position: relative;
    overflow: visible; /* allow badge to bleed outside the flag */
}

.header-info-language-option.active .header-info-flag::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background-color: #00A1AD;
    border-radius: 50%;
    border: 1.5px solid #333333;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5l2.5 2.5L8 3' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-size: 8px 8px;
    background-position: center;
    background-repeat: no-repeat;
}

.header-info-language-separator {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

/* Right Section - Phone + Buttons */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-phone svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.header-phone a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.header-phone a:hover {
    color: #00A1AD;
}

.header-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: transparent;
    color: #FFFFFF;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

/* Emergency button with coral color */
.header-button.emergency-button {
    background-color: #E84E4E !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}

.header-button.emergency-button:hover {
    background-color: #D43E3E !important;
    border-color: #FFFFFF !important;
}

.header-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Language Toggle Support */
[data-lang="en"] .header-message-fr,
[data-lang="en"] .button-text-fr {
    display: none !important;
}

[data-lang="fr"] .header-message-en,
[data-lang="fr"] .button-text-en {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-container {
        gap: 20px;
    }
    
    .header-right {
        gap: 15px;
    }
    
    .header-message {
        font-size: 13px;
    }
    
    .header-button {
        padding: 5px 12px;
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .header-container {
        gap: 15px;
    }
    
    .header-right {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header-info-bar {
        padding: 10px 0;
    }
    
    .header-container {
        padding: 0 15px;
        gap: 15px;
        justify-content: space-between;
    }
    
    /* Hide phone number on mobile */
    .header-phone {
        display: none !important;
    }
    
    /* Language switcher on mobile - show both flags */
    .header-left {
        flex: 0 0 auto;
    }
    
    .header-info-language-option {
        padding: 4px 6px;
        font-size: 13px;
    }
    
    /* Show flag but smaller */
    .header-info-language-option .header-info-flag {
        width: 22px;
        height: 15px;
    }
    
    /* Hide text, show only flags on mobile */
    .header-info-language-option span:not(.header-info-flag) {
        display: none;
    }
    
    /* Keep separator visible */
    .header-info-language-separator {
        font-size: 14px;
    }
    
    /* Right section with buttons */
    .header-right {
        display: flex;
        gap: 8px;
        flex: 1;
        justify-content: flex-end;
    }
    
    /* Button styling for mobile — pill style matching top banner */
    .header-button {
        padding: 5px 10px !important;
        font-size: 10px;
        gap: 5px;
        background: transparent !important;
        background-color: transparent !important;
        border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
        border-radius: 20px !important;
        color: #FFFFFF !important;
        flex-direction: row;
        align-items: center;
        transition: background 0.2s ease, border-color 0.2s ease !important;
        white-space: nowrap;
        overflow: hidden;
        max-width: 130px;
    }

    .header-button:hover {
        background: rgba(255, 255, 255, 0.12) !important;
        background-color: rgba(255, 255, 255, 0.12) !important;
        border-color: #FFFFFF !important;
        transform: none;
    }

    /* Emergency button — solid coral pill */
    .header-button.emergency-button {
        background-color: #E84E4E !important;
        border-color: rgba(255, 255, 255, 0.7) !important;
        border-radius: 20px !important;
    }

    .header-button.emergency-button:hover {
        background-color: #D43E3E !important;
        border-color: #FFFFFF !important;
    }

    .header-button svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 8px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .header-button {
        padding: 5px 8px !important;
        font-size: 9px;
        gap: 4px !important;
        max-width: 110px;
        letter-spacing: 0.03em;
    }

    .header-button svg {
        width: 13px;
        height: 13px;
    }
    
    .header-info-language-option {
        padding: 4px 6px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .header-right {
        gap: 5px;
    }

    /* Hide button text on very small screens, show icon only */
    .header-button .button-text-fr,
    .header-button .button-text-en {
        display: none !important;
    }

    .header-button {
        padding: 5px 8px !important;
        gap: 0 !important;
        max-width: none;
        border-radius: 50% !important;
        width: 32px;
        height: 32px;
        justify-content: center;
    }

    .header-button svg {
        width: 15px;
        height: 15px;
    }
}

/* Smooth transitions for language switching */
.button-text-en,
.button-text-fr {
    transition: opacity 0.2s ease;
}
