/**
 * Language Switcher Styles
 * Modern bilingual toggle for Hunter Processing Orders form
 */

/* ========================================
   LANGUAGE SWITCHER CONTAINER
   ======================================== */
.hpo-language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: var(--hpo-space-lg, 32px);
    padding: var(--hpo-space-md, 20px);
    background: linear-gradient(135deg, #FFFFFF 0%, #FAF9F7 100%);
    border-radius: 12px;
    box-shadow: var(--hpo-shadow-card, 0 2px 8px rgba(0, 0, 0, 0.06));
}

.hpo-language-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--hpo-text, #5C5C5C);
    margin-right: 12px;
    letter-spacing: 0.3px;
}

/* ========================================
   TOGGLE BUTTON GROUP
   ======================================== */
.hpo-language-toggle {
    display: inline-flex;
    background: var(--hpo-border, #EAE7E5);
    border-radius: 10px;
    padding: 4px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.hpo-language-option {
    position: relative;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--hpo-text, #5C5C5C);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.hpo-language-option:hover:not(.hpo-active) {
    color: var(--hpo-accent, #1B1B1B);
    background: rgba(180, 31, 37, 0.05);
}

.hpo-language-option:focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

/* Active state */
.hpo-language-option.hpo-active {
    background: var(--hpo-gradient-primary, linear-gradient(135deg, #B41F25 0%, #8E1820 100%));
    color: white;
    box-shadow: 0 4px 12px rgba(180, 31, 37, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Flag icons */
.hpo-language-flag {
    font-size: 20px;
    line-height: 1;
}

/* ========================================
   LOADING STATE
   ======================================== */
.hpo-language-toggle.hpo-switching {
    pointer-events: none;
    opacity: 0.6;
}

.hpo-language-option.hpo-switching::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   LANGUAGE INDICATOR BADGE
   ======================================== */
.hpo-current-language-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--hpo-gradient-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(180, 31, 37, 0.3);
    margin-left: 12px;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hpo-language-switcher {
        flex-direction: column;
        align-items: stretch;
        padding: var(--hpo-space-md);
    }

    .hpo-language-label {
        margin-right: 0;
        margin-bottom: 12px;
        text-align: center;
    }

    .hpo-language-toggle {
        width: 100%;
    }

    .hpo-language-option {
        flex: 1;
        justify-content: center;
        padding: 12px 16px;
        font-size: 16px;
    }

    .hpo-current-language-badge {
        margin-left: 0;
        margin-top: 12px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hpo-language-option {
        flex-direction: column;
        gap: 4px;
        padding: 10px;
    }

    .hpo-language-flag {
        font-size: 24px;
    }

    .hpo-language-option span:not(.hpo-language-flag) {
        font-size: 12px;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hpo-language-option,
    .hpo-language-toggle,
    .hpo-language-option::after {
        transition: none;
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hpo-language-option.hpo-active {
        border: 2px solid currentColor;
    }
}

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