/* Floating & Clean Header Language Switcher */
.up-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 14px;
    z-index: 100001;
    flex-shrink: 0;
}

.up-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(189, 158, 86, 0.65);
    border-radius: 999px;
    color: #ffffff;
    font-family: 'up-sans-medium', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.up-lang-trigger:hover,
.up-lang-switcher.is-open .up-lang-trigger {
    background: rgba(189, 158, 86, 0.22);
    border-color: #bd9e56;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.up-lang-globe {
    color: #bd9e56;
    flex-shrink: 0;
}

.up-lang-chevron {
    transition: transform 0.2s ease;
    opacity: 0.85;
}

.up-lang-switcher.is-open .up-lang-chevron {
    transform: rotate(180deg);
}

/* Floating Dropdown Card */
.up-lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: rgba(31, 33, 36, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(189, 158, 86, 0.38);
    border-radius: 12px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 100002;
}

.up-lang-switcher.is-open .up-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.up-lang-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.up-lang-menu__count {
    background: rgba(189, 158, 86, 0.22);
    color: #e4c77b;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
}

.up-lang-menu__search-wrap {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.up-lang-search {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 7px 10px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 7px !important;
    color: #ffffff !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    outline: none !important;
}

.up-lang-search::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.up-lang-search:focus {
    border-color: #bd9e56 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.up-lang-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 6px !important;
    max-height: 290px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.up-lang-list::-webkit-scrollbar {
    width: 5px;
}

.up-lang-list::-webkit-scrollbar-thumb {
    background: rgba(189, 158, 86, 0.45);
    border-radius: 999px;
}

.up-lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.25;
    transition: background 0.15s ease, color 0.15s ease;
}

.up-lang-item:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.up-lang-item.is-active {
    background: rgba(189, 158, 86, 0.22);
    color: #f3d991;
    font-weight: 600;
}

.up-lang-item__left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.up-lang-item__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.09);
    color: #d7ba70;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.up-lang-item.is-active .up-lang-item__code {
    background: #bd9e56;
    color: #1c1e20;
}

.up-lang-item__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.up-lang-item__check {
    color: #bd9e56;
    font-size: 12px;
    flex-shrink: 0;
}

.up-lang-empty {
    padding: 14px 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

@media screen and (max-width: 1100px) {
    .main-nav-contain {
        padding-right: 12px;
    }
    .up-lang-switcher {
        margin-left: 8px;
        margin-right: 4px;
    }
    .up-lang-menu {
        right: 0;
        width: 240px;
    }
}

/* Hide default Google Translate toolbar, badges, and tooltips */
.up-gt-hidden {
    display: none !important;
}

body {
    top: 0 !important;
}

.goog-te-banner-frame.skiptranslate,
iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.goog-te-gadget-icon,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip {
    display: none !important;
    visibility: hidden !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}
