/* Language switcher — marketing topbar + dashboard shell */
.upl-lang { position: relative; display: inline-flex; }
.upl-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #f1ede5;
    border-radius: 10px;
    background: rgba(255,255,255,.85);
    font-size: 12px;
    font-weight: 600;
    color: #3d3a36;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.upl-lang__btn:hover {
    background: #fff;
    border-color: #d4cfc4;
    box-shadow: 0 2px 6px -2px rgba(0,0,0,.06);
}
.upl-lang__flag-wrap { display: inline-flex; width: 18px; height: 13px; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 0.5px rgba(0,0,0,.05); }
.upl-lang__flag-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upl-lang__arrow { width: 10px; height: 6px; opacity: .5; flex-shrink: 0; transition: transform .15s ease, opacity .15s ease; }
.upl-lang.open .upl-lang__arrow { transform: rotate(180deg); opacity: .75; }
.upl-lang__menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    max-height: min(280px, calc(100vh - 96px));
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(180deg, #fdfcf9 0%, #faf7f2 100%);
    border: 1px solid #f1ede5;
    border-radius: 12px;
    box-shadow: 0 16px 40px -16px rgba(0,0,0,.15);
    z-index: 9999;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(168,163,156,.35) transparent;
}
.upl-lang__menu::-webkit-scrollbar { width: 2px; }
.upl-lang__menu::-webkit-scrollbar-track { background: transparent; }
.upl-lang__menu::-webkit-scrollbar-thumb {
    background: rgba(168,163,156,.28);
    border-radius: 999px;
}
.upl-lang__menu::-webkit-scrollbar-thumb:hover { background: rgba(168,163,156,.45); }
.upl-lang.open .upl-lang__menu { display: block; animation: uplLangMenuIn .18s cubic-bezier(.2,.7,.2,1) both; }
@keyframes uplLangMenuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.upl-lang__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #3d3a36;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background .12s ease, color .12s ease;
}
.upl-lang__option:hover { background: rgba(255,255,255,.75); color: #1a1816; }
.upl-lang__option.active {
    background: rgba(90,165,216,.12);
    color: #2d6fa8;
    font-weight: 600;
}

/* Dashboard compact variant in topbar */
.topbar .upl-lang-topbar {
    list-style: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    overflow: visible;
    position: relative;
    z-index: 2;
}
.topbar .upl-lang { margin-right: 2px; position: relative; display: inline-flex; z-index: 2; }
.topbar .upl-lang.open { z-index: 10060; }
.topbar .upl-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 300;
    color: inherit;
    cursor: pointer;
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: color .15s ease;
    box-shadow: none;
}
.topbar .upl-lang__btn:hover,
.topbar .upl-lang.open .upl-lang__btn {
    background: transparent;
    border: none;
    color: inherit;
    box-shadow: none;
    backdrop-filter: none;
}
.topbar .upl-lang__flag-wrap {
    display: inline-flex;
    width: 20px;
    height: 14px;
    overflow: hidden;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,.06);
}
.topbar .upl-lang__flag-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar .upl-lang__code {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    color: inherit;
}
.topbar .upl-lang__arrow { width: 10px; height: 6px; opacity: .45; flex-shrink: 0; color: #a8a39c; }
.topbar .upl-lang.open .upl-lang__arrow { opacity: .7; color: #6b6863; }
.topbar .upl-lang__menu {
    min-width: 196px;
    padding: 5px;
    z-index: 10061;
}
.topbar .upl-lang__option {
    padding: 9px 10px;
    font-size: 13px;
}
.topbar .upl-lang__option span:last-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar .upl-lang__option.active {
    box-shadow: inset 0 0 0 0.5px rgba(90,165,216,.22);
}
