/* The old pages' inline <style> blocks, rules unchanged, as a file (the CSP allows no inline <style>):
   includes/language-selector.php (printed twice per page), then support.php's contact form. */

.language-selector {
    position: relative;
    display: inline-block;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-toggle .fadt {
    font-size: 14px;
    line-height: 1;
}

.language-toggle .chevron {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.language-selector.open .chevron {
    transform: rotate(180deg);
}

.current-lang {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.15s ease;
    font-size: 0.875rem;
}

.language-option:hover {
    background: rgba(29, 181, 132, 0.1);
}

.language-option.active {
    background: rgba(29, 181, 132, 0.15);
    color: #1DB584;
    font-weight: 500;
}

.lang-code {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    opacity: 0.7;
    min-width: 2rem;
}

.lang-name {
    flex: 1;
    text-align: right;
}

/* Theme-specific styles */
[data-theme="light"] .language-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

[data-theme="light"] .language-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .language-toggle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

[data-theme="dark"] .language-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .language-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .language-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-dropdown {
        min-width: 180px;
        right: -1rem;
    }

    .language-option {
        padding: 0.6rem 0.8rem;
    }
}

/* support.php: the contact form */
.contact-form { max-width: 560px; margin: 0 auto 2rem; text-align: left; display: grid; gap: 1rem; }
.contact-form label { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; }
.contact-form select, .contact-form input[type="email"], .contact-form textarea {
    width: 100%; box-sizing: border-box; padding: 0.75rem; font: inherit;
    color: var(--text-primary); background: var(--surface); border: 1px solid var(--border-secondary); border-radius: 8px;
}
.contact-form textarea { min-height: 9rem; resize: vertical; }
.contact-form .hint { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.35rem; }
/* The trap field: off screen for people, still in the form for bots */
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .status { min-height: 1.5rem; font-weight: 600; }
.contact-form .status[data-status="sent"] { color: var(--success); }
.contact-form .status[data-status="invalid"], .contact-form .status[data-status="limited"], .contact-form .status[data-status="failed"] { color: var(--danger); }
