@import url("./header-controls/header-controls-01.css?v=20260722_header_text_layout_1");
@import url("./header-controls/header-controls-02.css?v=20260722_header_text_layout_1");
@import url("./header-controls/header-controls-legacy-fallback.css?v=20260722_header_text_layout_1");

/* 顶栏语言/主题：无图标 + 文字撑开宽度（禁止绝对定位把容器塌成 0） */
.loginArea .langSwitch::before,
.loginArea .langSwitch::after,
.loginArea .theme-toggle:not(.theme-toggle--mobile)::before,
.loginArea .theme-toggle:not(.theme-toggle--mobile)::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
}
.loginArea .langSwitch,
.loginArea .theme-toggle:not(.theme-toggle--mobile) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    position: relative !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 36px !important;
    padding: 0 12px !important;
    overflow: visible !important;
}
.loginArea .langSwitch__label,
.loginArea .theme-toggle:not(.theme-toggle--mobile) .theme-toggle-label {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
    line-height: 36px !important;
    pointer-events: none !important;
}
.loginArea #siteLangSelect,
.loginArea .theme-toggle:not(.theme-toggle--mobile) .theme-toggle-select {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: transparent !important;
    opacity: 0.01 !important;
    box-shadow: none !important;
}
/* 自定义主题触发层铺满外壳即可，勿再写死宽度 */
.loginArea .theme-toggle-custom-trigger {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

/* A9 focus layer for shared header controls */
#siteLangSelect:focus-visible,
.inav-language-select:focus-visible,
.theme-toggle-btn:focus-visible,
.theme-toggle-select:focus-visible,
.topIntegralBadge:focus-visible,
.couponCodeBadge:focus-visible,
.loginArea .loginBtn:focus-visible,
.loginArea .avatarBtn:focus-visible,
.headerUserStack:focus-within,
.theme-toggle:focus-within {
    outline: 3px solid var(--a9-focus-ring, #58a6ff);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--a9-focus-shadow, rgba(88, 166, 255, .28));
}

.headerUserStack.hasVipMark .headerVipBadge {
    position: absolute;
    top: 2px;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 16px;
    padding: 0 6px;
    border: 1px solid rgba(255, 230, 148, 0.55);
    border-radius: 999px;
    background: linear-gradient(135deg, #fff4b8 0%, #f6c85f 45%, #c98a14 100%);
    color: #3b2500;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .3px;
    box-shadow:
        0 6px 14px rgba(188, 130, 17, .32),
        inset 0 1px 0 rgba(255, 255, 255, .45);
    pointer-events: none;
    text-transform: uppercase;
}

.headerAssetBadge,
.headerNavMiniBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 18px;
    min-height: 18px;
    padding: 0 8px;
    border: 1px solid rgba(98, 143, 231, 0.38);
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(19, 29, 45, 0.94), rgba(8, 14, 25, 0.9));
    color: #dbe8ff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(0, 8, 25, 0.24);
    transition: border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.headerAssetBadge {
    gap: 4px;
    width: min(106px, 100%);
    letter-spacing: 0;
}

.headerNavMiniBadge {
    min-width: 0;
    letter-spacing: 0;
}

.headerAssetBadge:hover,
.headerNavMiniBadge:hover {
    border-color: rgba(99, 158, 255, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 14px 30px rgba(30, 88, 190, 0.22);
}

.headerAssetBadge .icon {
    width: 11px;
    height: 11px;
    display: block;
    flex: 0 0 auto;
}

.headerAssetBadge span {
    display: block;
    min-width: 0;
    white-space: nowrap;
}

.headerAssetBadge--785compact,
.headerChannelBadge--785compact,
.headerFeedbackBadge--785compact {
    display: none !important;
}

@media screen and (max-width: 767px) {
    .headerUserStack.hasVipMark .headerVipBadge {
        top: -1px;
        right: -2px;
        min-width: 24px;
        height: 14px;
        padding: 0 5px;
        font-size: 9px;
    }

    #siteLangSelect,
    .inav-language-select,
    .theme-toggle-btn,
    .theme-toggle-select,
    .theme-toggle--mobile .theme-toggle-btn,
    .theme-toggle--mobile .theme-toggle-select,
    .loginArea .loginBtn,
    .loginArea .avatarBtn {
        min-width: 44px;
        min-height: 44px;
        box-sizing: border-box;
        font-size: max(14px, 1em);
        line-height: 1.25;
        touch-action: manipulation;
    }

    .loginArea .loginBtn,
    .topIntegralBadge,
    .couponCodeBadge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
        word-break: normal;
    }

    .inav-language-label {
        font-size: max(12px, 1em);
    }
}
