/*
 * Theme and locale controls for Next to you... v3.6.20_performance.
 * Author: Beck Sarbassov - Date created: 2026-05-13 - Date modified: 2026-05-20.
 * Copyright: (c) Beck Sarbassov. 2026. All rights reserved.
 */

.toolbar-preferences,
.auth-preferences {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.locale-switcher-select-wrap {
    position: relative;
    flex: 0 1 138px;
    min-width: 96px;
    max-width: 148px;
}

.theme-light .locale-switcher {
    background: rgba(255, 255, 255, 0.92);
}

.locale-switcher button,
.theme-toggle {
    min-height: 40px;
}

.locale-switcher-select {
    width: 100%;
    min-height: 40px;
    padding: 0 38px 0 14px;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    font-family: "Segoe UI", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.locale-switcher-select:focus {
    outline: none;
}

.locale-switcher-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.locale-switcher button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    color: var(--muted);
    background: transparent;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.locale-switcher button:hover,
.locale-switcher button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ink);
    outline: none;
}

.theme-light .locale-switcher button:hover,
.theme-light .locale-switcher button:focus-visible {
    background: rgba(23, 33, 31, 0.08);
}

.locale-switcher button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--coral));
    box-shadow: 0 8px 24px rgba(0, 143, 122, 0.2);
}

.locale-switcher small {
    opacity: 0.8;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.theme-toggle-icon {
    font-size: 16px;
    line-height: 1;
}

.locale-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: var(--ink);
    background: rgba(0, 143, 122, 0.14);
    border: 1px solid rgba(0, 143, 122, 0.26);
}

.theme-light .locale-badge {
    background: rgba(0, 143, 122, 0.12);
}

.preference-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.preference-inline .field-hint {
    width: 100%;
    margin-top: -4px;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.translation-hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .toolbar-preferences {
        gap: 8px;
    }

    .locale-switcher {
        width: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .auth-preferences,
    .toolbar-preferences {
        width: auto;
        justify-content: flex-end;
        gap: 8px;
    }

    .locale-switcher-select-wrap {
        flex: 0 0 88px;
        width: 88px;
        min-width: 88px;
        max-width: 88px;
    }

    .locale-switcher-select {
        padding-left: 11px;
        padding-right: 26px;
        font-size: 10px;
        letter-spacing: 0.02em;
    }
}

.auth-phone-top .brand,
.app-mobile-header .brand,
.admin-topbar .brand,
.legal-header .brand {
    min-width: 0;
}

.auth-phone-top .toolbar-preferences,
.app-mobile-header .toolbar-preferences,
.admin-topbar .toolbar-preferences,
.legal-header .toolbar-preferences {
    margin-left: auto;
    flex: 0 0 auto;
}

.app-mobile-header .app-header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.app-mobile-header .locale-switcher-select-wrap,
.auth-phone-top .locale-switcher-select-wrap {
    min-width: 84px;
}

@media (max-width: 480px) {
    .auth-page-v31 .auth-phone-top,
    .app-v31 .app-mobile-header {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .auth-page-v31 .auth-phone-top .brand,
    .app-v31 .app-mobile-header .brand {
        min-width: 0 !important;
        width: 100% !important;
    }

    .auth-page-v31 .auth-phone-top .brand-wordmark,
    .app-v31 .app-mobile-header .brand-wordmark {
        max-width: 118px !important;
    }

    .app-mobile-header .locale-switcher-select-wrap,
    .auth-phone-top .locale-switcher-select-wrap {
        flex-basis: 84px;
        width: 84px;
        min-width: 84px;
        max-width: 84px;
    }

    .auth-phone-top .toolbar-preferences,
    .app-mobile-header .toolbar-preferences {
        gap: 6px !important;
    }

    .theme-toggle {
        min-width: 40px !important;
        min-height: 40px !important;
    }
}

.app-v31 .person-card .person-name,
.app-v31 .person-card h3 {
    color: #fbfdff !important;
}

.app-v31 .person-card .person-meta {
    color: #9cb1cb !important;
    font-weight: 700;
}

.app-v31 .purpose-block {
    display: grid;
    gap: 8px;
    margin: 12px 0 10px;
}

.app-v31 .purpose-block strong,
.app-v31 .hashtags strong {
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-v31 .purpose-block strong {
    color: #8eb7d7 !important;
}

.app-v31 .chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-v31 .interest-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(142, 183, 215, 0.24);
    background: rgba(142, 183, 215, 0.08);
    color: #ecf6ff !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.app-v31 .hashtags {
    display: block;
    margin: 0 0 10px;
}

.app-v31 .hashtags strong {
    color: #76d8c7 !important;
    margin-bottom: 8px;
}

.app-v31 .hashtags span {
    display: inline-flex;
    margin: 0 12px 8px 0;
    color: #b7f2e8 !important;
    font-weight: 800;
    white-space: nowrap;
}

.app-v31 .person-card p:not(.person-meta):not(.hashtags):not(.privacy-note) {
    color: #bcc9dc !important;
}

.app-v31 .person-card .privacy-note,
.app-v31 .person-card .status-line {
    color: #8a99ad !important;
}

html.theme-light .app-v31 .person-card .person-name,
html.theme-light .app-v31 .person-card h3 {
    color: #13202b !important;
}

html.theme-light .app-v31 .person-card .person-meta {
    color: #51657a !important;
}

html.theme-light .app-v31 .purpose-block strong {
    color: #2b607f !important;
}

html.theme-light .app-v31 .interest-chip {
    color: #153040 !important;
    background: rgba(0, 143, 122, 0.1);
    border-color: rgba(0, 143, 122, 0.16);
}

html.theme-light .app-v31 .hashtags strong {
    color: #0b7c6d !important;
}

html.theme-light .app-v31 .hashtags span {
    color: #087164 !important;
}

html.theme-light .app-v31 .person-card p:not(.person-meta):not(.hashtags):not(.privacy-note) {
    color: #5a6979 !important;
}

.admin-v33 .admin-nav-item,
.admin-v33 .admin-logout-link {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-v33 .admin-nav-item:hover,
.admin-v33 .admin-nav-item.active,
.admin-v33 .admin-logout-link:hover {
    color: #eef7ff !important;
    background: linear-gradient(135deg, rgba(0, 168, 145, 0.1), rgba(255, 79, 63, 0.06)) !important;
    border-color: rgba(0, 168, 145, 0.18) !important;
}

html.theme-light .admin-v33 .admin-nav-item:hover,
html.theme-light .admin-v33 .admin-nav-item.active,
html.theme-light .admin-v33 .admin-logout-link:hover {
    color: #1f2f3d !important;
    background: linear-gradient(135deg, rgba(0, 143, 122, 0.08), rgba(230, 90, 69, 0.06)) !important;
    border-color: rgba(0, 143, 122, 0.16) !important;
}

html.theme-light .admin-v33 .button-secondary:hover {
    color: #1a2a37 !important;
    background: #f2f7fa !important;
    border-color: rgba(11, 24, 38, 0.16) !important;
}

html:not(.theme-light) .admin-v33 .admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.035) !important;
    color: var(--nty-v357-dark-body) !important;
}

html:not(.theme-light) .admin-v33 .admin-table tbody tr:hover td strong {
    color: #f8fbff !important;
}

html.theme-light .admin-v33 .admin-table tbody tr:hover td {
    background: rgba(0, 143, 122, 0.055) !important;
    color: var(--nty-v357-light-body) !important;
}

html.theme-light .admin-v33 .admin-table tbody tr:hover td strong {
    color: var(--nty-v357-light-ink) !important;
}

.auth-consent-chip {
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    line-height: 1.45 !important;
}

.auth-consent-chip input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.auth-consent-chip span {
    white-space: normal;
}

.auth-consent-chip a {
    color: #7de3d0;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

html.theme-light .auth-consent-chip a {
    color: #0b7c6d;
}


