/* Field help text styles */
.field-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced focus indicators for better accessibility */
.cart-consent input[type="checkbox"]:focus {
    outline: 2px solid #2e7d32;
    outline-offset: 2px;
}

.lang-btn:focus {
    outline: 2px solid #2e7d32;
    outline-offset: 2px;
}

/* UNIFIED LANGUAGE SWITCHER STYLES */
/* Override all existing language switcher styles for consistency */

.language-switcher {
    display: flex !important;
    gap: 8px !important;
    padding: 1rem !important;
    justify-content: center !important;
    align-items: center !important;
}

.language-switcher .lang-btn {
    /* Base styles for all language buttons */
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    min-width: 45px !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* DESKTOP STYLES - White/transparent for dark backgrounds */
@media (min-width: 769px) {
    .language-switcher .lang-btn {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        color: white !important;
    }
    
    .language-switcher .lang-btn:hover {
        background: rgba(255, 255, 255, 0.25) !important;
        border-color: rgba(255, 255, 255, 0.8) !important;
        color: white !important;
    }
    
    .language-switcher .lang-btn[aria-pressed="true"],
    .language-switcher .lang-btn.active {
        background: rgba(255, 255, 255, 0.3) !important;
        border-color: white !important;
        color: white !important;
        font-weight: 700 !important;
    }
    
    .language-switcher .lang-btn[aria-pressed="false"] {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.6) !important;
        color: white !important;
    }
}

/* MOBILE STYLES - Green theme for light backgrounds */
@media (max-width: 768px) {
    .language-switcher .lang-btn {
        background: rgba(46, 125, 50, 0.1) !important;
        border: 2px solid var(--primary-color, #2e7d32) !important;
        color: var(--primary-color, #2e7d32) !important;
        box-shadow: 0 2px 4px rgba(46, 125, 50, 0.1) !important;
    }
}

/* MOBILE HOVER AND ACTIVE STATES */
@media (max-width: 768px) {
    .language-switcher .lang-btn:hover {
        background: rgba(46, 125, 50, 0.2) !important;
        border-color: var(--primary-color, #2e7d32) !important;
        color: var(--primary-color, #2e7d32) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3) !important;
    }
    
    .language-switcher .lang-btn[aria-pressed="true"],
    .language-switcher .lang-btn.active {
        background: var(--primary-color, #2e7d32) !important;
        border-color: var(--primary-color, #2e7d32) !important;
        color: white !important;
        font-weight: 700 !important;
        box-shadow: 0 3px 6px rgba(46, 125, 50, 0.4) !important;
    }
    
    .language-switcher .lang-btn[aria-pressed="false"] {
        background: rgba(46, 125, 50, 0.1) !important;
        border-color: var(--primary-color, #2e7d32) !important;
        color: var(--primary-color, #2e7d32) !important;
        opacity: 1 !important;
    }
}

/* DESKTOP HOVER EFFECTS */
@media (min-width: 769px) {
    .language-switcher .lang-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    }
}

/* Focus state for accessibility */
.language-switcher .lang-btn:focus {
    outline: 2px solid #2e7d32 !important;
    outline-offset: 2px !important;
    background: rgba(46, 125, 50, 0.2) !important;
    color: var(--primary-color, #2e7d32) !important;
}

/* MOBILE TEXT COLOR FIX */
/* Ensure text is dark on mobile pages with white/light backgrounds */
@media (max-width: 768px) {
    body {
        color: #333 !important;
        background-color: #ffffff !important;
    }
    
    main {
        color: #333 !important;
    }
    
    p, div, span, li, td, th {
        color: inherit !important;
    }
    
    /* Ensure headings are dark on mobile */
    h1, h2, h3, h4, h5, h6 {
        color: #2e7d32 !important;
    }
    
    /* Exception for hero sections which should keep white text */
    .hero h1, .hero p, .hero span {
        color: white !important;
    }
    
    /* Exception for buttons which should keep their intended colors */
    .btn {
        color: white !important;
    }
}
