/* ── LibreTranslate WP – Language Switcher Styles ── */

#lt-wp-switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#lt-wp-switcher-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

#lt-wp-switcher-inner:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.1);
}

#lt-wp-globe {
    font-size: 18px;
    line-height: 1;
    user-select: none;
}

#lt-wp-lang-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #1a202c;
    cursor: pointer;
    padding-right: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    outline: none;
    max-width: 160px;
}

#lt-wp-lang-select:focus {
    outline: 2px solid #4f46e5;
    border-radius: 4px;
}

/* ── Loader / Spinner ── */
#lt-wp-loader {
    display: flex;
    align-items: center;
}

.lt-wp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: lt-wp-spin 0.7s linear infinite;
}

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

/* ── RTL support ── */
[dir="rtl"] #lt-wp-switcher {
    right: auto;
    left: 24px;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    #lt-wp-switcher {
        bottom: 12px;
        right: 12px;
    }

    #lt-wp-switcher-inner {
        padding: 6px 12px;
    }

    #lt-wp-lang-select {
        font-size: 13px;
        max-width: 120px;
    }
}

/* ── Dark mode support ── */
@media (prefers-color-scheme: dark) {
    #lt-wp-switcher-inner {
        background: #1e293b;
        border-color: #334155;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }

    #lt-wp-lang-select {
        color: #f1f5f9;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .lt-wp-spinner {
        border-color: #334155;
        border-top-color: #818cf8;
    }
}
