/* =========================================================
   Language picker (layout + login)
   ========================================================= */

/* --- Sidebar trigger (app layout) --- */
.sidebar-language-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    line-height: 0;
    vertical-align: middle;
    flex: 0 0 auto;
}

.sidebar-language-menu > .icon-btn {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none;
}

.sidebar-language-menu > .icon-btn:hover,
.sidebar-language-menu > .icon-btn[aria-expanded="true"] {
    background-color: var(--hover, #f1f3f7) !important;
}

/* --- Login trigger --- */
.login-language-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-language-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.login-language-btn:hover,
.login-language-btn[aria-expanded="true"] {
    background: #f8fafc;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    transform: translateY(-1px);
}

.login-language-btn i {
    font-size: 18px;
    line-height: 1;
}

/* --- Shared floating panel --- */
.lang-picker,
.lang-picker * {
    box-sizing: border-box;
}

.lang-picker {
    display: none;
    position: fixed;
    width: 280px;
    max-width: calc(100vw - 24px);
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    z-index: 4000;
}

/* [hidden] uses display:none !important in browsers */
.lang-picker.is-open,
.lang-picker.is-open[hidden] {
    display: block !important;
}

.lang-picker-header {
    padding: 2px 4px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid #eef2f7;
}

.lang-picker-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.lang-picker-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

.lang-picker button.lang-option {
    width: 100% !important;
    height: auto !important;
    min-height: 44px;
    padding: 10px 12px !important;
    margin: 0 0 6px 0;
    border: 1px solid #e8edf5 !important;
    border-radius: 10px !important;
    background: #fff !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 12px;
    transform: none !important;
    box-shadow: none !important;
    text-align: left;
    cursor: pointer;
    color: #1e293b;
    line-height: 1.25;
}

.lang-picker button.lang-option:hover,
.lang-picker button.lang-option:focus-visible,
.lang-picker button.lang-option[aria-expanded="true"] {
    background: #f5f7fb !important;
    border-color: #d7dee9 !important;
    transform: none !important;
}

.lang-picker button.lang-option i {
    width: auto !important;
    height: auto !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

.lang-option-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lang-option-icon.google {
    background: #eef3ff;
    color: #4285f4;
}

.lang-option-icon.faro {
    background: #e8f8f3;
    color: #0f766e;
}

.lang-option-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-option-chevron {
    color: #94a3b8;
    font-size: 11px !important;
    flex-shrink: 0;
    transition: transform .15s ease;
}

.lang-option[aria-expanded="true"] .lang-option-chevron {
    transform: rotate(180deg);
    color: #475569;
}

.lang-panel {
    display: none;
    margin: 0 0 2px;
    padding: 6px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

/* Login always shows the language list open */
.lang-panel.lang-panel--static,
.lang-panel.show {
    display: block;
}

.lang-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.lang-panel-list li + li {
    margin-top: 2px;
}

.lang-panel-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}

.lang-panel-link:hover {
    background: #fff;
    color: #0f172a;
}

.lang-panel-link.active {
    background: #fff;
    color: #0f766e;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #c7f0e4;
}

.lang-panel-link .check {
    color: #0f766e;
    font-size: 11px;
    opacity: 0;
    flex-shrink: 0;
}

.lang-panel-link.active .check {
    opacity: 1;
}

/* Google Translate host (hidden until used) */
#google_translate_element.google-translate-host {
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Google Translate chrome cleanup */
div[class*="VIpgJd-ZVi9od-aZ2wEe"] {
    display: none !important;
    visibility: hidden !important;
}

.goog-te-banner-frame {
    display: none !important;
}

.goog-te-ftab {
    display: none !important;
}

.skiptranslate iframe {
    visibility: hidden !important;
    display: none !important;
}
