.hdv2-cah-topbar-more {
    display: contents;
}

.hdv2-cah-topbar-more__trigger {
    display: none;
}

.hdv2-cah-topbar-more__panel {
    display: contents;
}

.hdv2-cah-topbar-more__item {
    display: contents;
}

@media (max-width: 768px) {
    .hdv2-cah-topbar-more {
        position: relative;
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        z-index: 30;
    }

    .hdv2-cah-topbar-more__trigger {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        min-width: 2rem;
        height: 2rem;
        min-height: 2rem;
        padding: 0;
        border: 1px solid var(--hdv2-cah-border, #e4e4e7);
        border-radius: 0.5rem;
        background: var(--hdv2-cah-card, #fff);
        color: var(--hdv2-cah-fg, #3f3f46);
        cursor: pointer;
        line-height: 0;
        flex-shrink: 0;
    }

    .hdv2-cah-topbar-more__trigger:hover,
    .hdv2-cah-topbar-more.is-open .hdv2-cah-topbar-more__trigger {
        background: var(--hdv2-cah-accent, #f4f4f5);
    }

    .hdv2-cah-topbar-more__trigger .hdv2-cah-topbar-more__icon {
        width: 1.05rem;
        height: 1.05rem;
        stroke: currentColor;
        fill: none;
        pointer-events: none;
    }

    .hdv2-cah-topbar-more__icon--dots {
        display: block;
    }

    .hdv2-cah-topbar-more__icon--chevron {
        display: none !important;
    }

    body.hdv2-notifications-open .hdv2-cah-topbar-more__icon--dots {
        display: none !important;
    }

    body.hdv2-notifications-open .hdv2-cah-topbar-more__icon--chevron {
        display: block !important;
    }

    body.hdv2-notifications-open .hdv2-cah-topbar-more__trigger {
        background: var(--hdv2-cah-accent, #f4f4f5);
    }

    .hdv2-cah-topbar-more__badge {
        position: absolute;
        top: -0.3rem;
        right: -0.3rem;
        min-width: 1.05rem;
        height: 1.05rem;
        padding: 0 0.22rem;
        border-radius: 999px;
        background: hsl(0 72% 51%);
        color: #fff;
        font-size: 0.62rem;
        font-weight: 700;
        line-height: 1.05rem;
        text-align: center;
        pointer-events: none;
    }

    .hdv2-cah-topbar-more__badge[hidden] {
        display: none !important;
    }

    .hdv2-cah-topbar-more__panel {
        display: none;
        position: absolute;
        top: calc(100% + 0.35rem);
        right: 0;
        width: max-content;
        min-width: 11.25rem;
        max-width: min(16rem, calc(100vw - 1.25rem));
        padding: 0.3rem;
        border: 1px solid var(--hdv2-cah-border, #e4e4e7);
        border-radius: 0.7rem;
        background: var(--hdv2-cah-card, #fff);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
        flex-direction: column;
        gap: 0.1rem;
        z-index: 40;
    }

    .hdv2-cah-topbar-more.is-open .hdv2-cah-topbar-more__panel {
        display: flex;
    }

    .hdv2-cah-topbar-more__item {
        display: block;
        width: 100%;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-lang-btn,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__tour,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme {
        width: 100%;
        min-width: 0;
        height: 2.35rem;
        min-height: 2.35rem;
        justify-content: flex-start;
        gap: 0.6rem;
        padding: 0 0.65rem;
        border: 0;
        border-radius: 0.45rem;
        background: transparent;
        box-shadow: none;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-lang-btn:hover,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications:hover,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__tour:hover,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme:hover {
        background: var(--hdv2-cah-accent, #f4f4f5);
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-lang-btn__label,
    .hdv2-cah-topbar-more__panel .hdv2-cah-lang-btn__caret {
        display: inline !important;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-lang-btn__label {
        max-width: none;
        flex: 1;
        text-align: left;
        font-size: 0.86rem;
        font-weight: 500;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications-wrap {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .hdv2-cah-topbar-more__panel .hdv2-tooltip::before {
        display: none !important;
        content: none !important;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-lang-btn.hdv2-tooltip::after {
        display: none !important;
        content: none !important;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications.hdv2-tooltip::after,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__tour.hdv2-tooltip::after,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme.hdv2-tooltip::after {
        content: attr(data-hdv2-tooltip);
        position: static;
        left: auto;
        top: auto;
        bottom: auto;
        right: auto;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: none;
        background: transparent;
        color: var(--hdv2-cah-fg, #3f3f46);
        border-radius: 0;
        padding: 0;
        font-size: 0.86rem;
        font-weight: 500;
        letter-spacing: normal;
        line-height: 1.25;
        flex: 1 1 auto;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: auto;
        transition: none;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications {
        position: relative;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications-badge {
        position: absolute;
        top: 0.28rem;
        left: 0.42rem;
        right: auto;
        margin: 0;
        z-index: 1;
        min-width: 0.85rem;
        height: 0.85rem;
        padding: 0 0.18rem;
        font-size: 0.55rem;
        font-weight: 700;
        line-height: 0.85rem;
        background: #dc2626;
        box-shadow: 0 0 0 1.5px var(--hdv2-cah-card, #fff);
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__tour:not(.is-ready) {
        display: none !important;
    }

    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications svg,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__tour svg,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme svg,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme .hdv2-icon--moon,
    .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme .hdv2-icon--sun {
        flex-shrink: 0;
    }

    .hdv2-cah-topbar__cart {
        margin-right: 0;
        order: 1;
    }

    .hdv2-cah-topbar-more {
        order: 2;
    }
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar-more__trigger {
    border-color: var(--hdv2-cah-border);
    background: var(--hdv2-cah-card);
    color: var(--hdv2-cah-fg);
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar-more__panel {
    border-color: var(--hdv2-cah-border);
    background: var(--hdv2-cah-card);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__notifications.hdv2-tooltip::after,
:root[data-hdv2-theme="dark"] .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__tour.hdv2-tooltip::after,
:root[data-hdv2-theme="dark"] .hdv2-cah-topbar-more__panel .hdv2-cah-topbar__theme.hdv2-tooltip::after {
    color: var(--hdv2-cah-fg);
}
