/* ============================================
   WP Language Switcher Modal - CSS
   ============================================ */

:root {
    --wp-lang-primary: #2E75B6;
    --wp-lang-secondary: #44546A;
    --wp-lang-light: #F5F5F5;
    --wp-lang-border: #E0E0E0;
    --wp-lang-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Modal Container
   ============================================ */

.wp-language-switcher-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.wp-language-switcher-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   Modal Content
   ============================================ */

.wp-language-switcher-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--wp-lang-shadow);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   Close Button
   ============================================ */

.wp-language-switcher-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--wp-lang-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

.wp-language-switcher-close:hover {
    background-color: var(--wp-lang-light);
    color: var(--wp-lang-primary);
    transform: rotate(90deg);
}

/* ============================================
   Modal Header
   ============================================ */

.wp-language-switcher-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--wp-lang-border);
    text-align: center;
}

.wp-language-switcher-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--wp-lang-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
   Modal Body
   ============================================ */

.wp-language-switcher-body {
    padding: 30px;
}

.wp-language-switcher-info {
    margin: 0 0 25px;
    text-align: center;
    color: var(--wp-lang-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   Language Buttons
   ============================================ */

.wp-language-switcher-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.wp-language-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 15px;
    border: 2px solid var(--wp-lang-border);
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 120px;
}

.wp-language-btn:hover {
    border-color: var(--wp-lang-primary);
    background-color: var(--wp-lang-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 117, 182, 0.2);
}

.wp-language-btn.active {
    background-color: var(--wp-lang-primary);
    border-color: var(--wp-lang-primary);
    color: white;
}

/* ============================================
   Language Button Elements
   ============================================ */

.wp-language-flag {
    font-size: 40px;
    line-height: 1;
}

.wp-language-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--wp-lang-primary);
}

.wp-language-btn.active .wp-language-name {
    color: white;
}

.wp-language-desc {
    font-size: 12px;
    color: var(--wp-lang-secondary);
    opacity: 0.7;
}

.wp-language-btn.active .wp-language-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Modal Footer
   ============================================ */

.wp-language-switcher-footer {
    padding: 15px 30px;
    border-top: 1px solid var(--wp-lang-border);
    text-align: center;
    background-color: var(--wp-lang-light);
    border-radius: 0 0 12px 12px;
    font-size: 12px;
    color: var(--wp-lang-secondary);
    line-height: 1.5;
}

/* ============================================
   Toggle Button (Floating)
   ============================================ */

.wp-language-switcher-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--wp-lang-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--wp-lang-shadow);
    transition: all 0.3s ease;
    z-index: 99998;
}

.wp-language-switcher-toggle:hover {
    background-color: var(--wp-lang-secondary);
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(46, 117, 182, 0.3);
}

.wp-language-switcher-toggle:active {
    transform: scale(0.95);
}

.wp-language-switcher-toggle .wp-language-switcher-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    color: #fff !important;
    line-height: 1 !important;
    flex: 0 0 28px !important;
}

.wp-language-switcher-toggle .wp-language-switcher-icon svg {
    display: block !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-width: none !important;
    max-height: none !important;
    flex: 0 0 28px !important;
}

.wp-language-switcher-google-widget {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

body {
    top: 0 !important;
}

body.translated-ltr,
body.translated-rtl {
    top: 0 !important;
}

.skiptranslate iframe,
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 600px) {
    .wp-language-switcher-modal-content {
        max-width: 95%;
    }

    .wp-language-switcher-header {
        padding: 20px 20px 15px;
    }

    .wp-language-switcher-header h2 {
        font-size: 20px;
    }

    .wp-language-switcher-body {
        padding: 20px;
    }

    .wp-language-switcher-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .wp-language-btn {
        min-height: 100px;
    }

    .wp-language-flag {
        font-size: 35px;
    }

    .wp-language-name {
        font-size: 15px;
    }

    .wp-language-switcher-toggle {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .wp-language-switcher-footer {
        padding: 12px 20px;
        font-size: 11px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

.wp-language-switcher-toggle:focus,
.wp-language-btn:focus,
.wp-language-switcher-close:focus {
    outline: 2px solid var(--wp-lang-primary);
    outline-offset: 2px;
}

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
    .wp-language-switcher-modal-content {
        background-color: #2d2d2d;
    }

    .wp-language-switcher-header {
        border-bottom-color: #444;
    }

    .wp-language-switcher-info {
        color: #ccc;
    }

    .wp-language-btn {
        background-color: #3a3a3a;
        border-color: #444;
    }

    .wp-language-btn:hover {
        border-color: var(--wp-lang-primary);
        background-color: #4a4a4a;
    }

    .wp-language-name {
        color: #fff;
    }

    .wp-language-desc {
        color: #aaa;
    }

    .wp-language-switcher-footer {
        background-color: #3a3a3a;
        border-top-color: #444;
        color: #aaa;
    }

    .wp-language-switcher-close {
        color: #ccc;
    }

    .wp-language-switcher-close:hover {
        background-color: #444;
        color: var(--wp-lang-primary);
    }
}
