.tk-score-tooltip-trigger { position: relative; z-index: 1; }

.tk-score-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 32px));
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.12);
    padding: 0.85rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 9999;
}

.tk-score-tooltip::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-left: 1px solid rgba(15,23,42,0.08);
    border-bottom: 1px solid rgba(15,23,42,0.08);
}

.tk-score-tooltip-trigger:hover .tk-score-tooltip,
.tk-score-tooltip-trigger:focus-within .tk-score-tooltip,
.tk-score-tooltip-trigger.active .tk-score-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.tk-score-tooltip-title { margin-bottom: 0.7rem; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: #0f172a; font-weight: 700; font-family: 'Inter', 'Segoe UI', sans-serif; }
.tk-score-tooltip ul { margin: 0; padding: 0; list-style: none; }
.tk-score-tooltip li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(15,23,42,0.08); font-size: 0.9rem; color: #475569; font-family: 'Inter', 'Segoe UI', sans-serif; }
.tk-score-tooltip li:last-child { border-bottom: none; padding-bottom: 0; }
.tk-score-tooltip li span { display: inline-flex; align-items: center; gap: 0.5rem; color: #334155; }
.tk-score-tooltip li span i { font-size: 1rem; color: #f59e0b; }
.tk-score-tooltip li strong { color: #0a1833; font-weight: 700; }

/* Scoped helpers for seller badge and score */
.seller-score-info { display: flex; align-items: center; gap: 0.5rem; }
.seller-score-info i { font-size: 1rem; color: #6b7280; cursor: help; }

/* Ensure sub-menu positioning doesn't get overridden */
.tb-header .sub-menu { z-index: 1500; }

/* Ensure expert content displays properly */
.tb-switch-profile .tb-expert-content {
    overflow: visible !important;
    position: relative;
}

/* Badge progress card styling for dropdown menu */
.tk-next-badge-card {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    position: relative;
    z-index: 1;
}

.tk-next-badge-card .tk-score-tooltip-trigger {
    position: relative;
    display: block;
    z-index: 1;
}

.tk-next-badge-card .tk-score-tooltip-trigger > div:first-child {
    display: block;
    width: 100%;
    height: 8px;
    background: #E8E8E8;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.tk-next-badge-card .tk-score-tooltip-trigger > div:first-child > div {
    display: block;
    height: 8px;
    background: linear-gradient(90deg, #4f91ff 0%, #2ac7ff 100%);
    transition: width 0.3s ease;
}

.tk-next-badge-card .tk-score-tooltip {
    left: unset;
    right: 0;
    transform: none;
    bottom: calc(100% + 8px);
}

.tk-next-badge-card .small {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #6B7280;
}

/* Center user profile dropdown on small screens without affecting desktop */
/* @media (max-width: 768px) {
    .tb-userlogin .sub-menu {
        left: 1% !important;
        right: auto !important;
        transform: translateX(-65%) !important;
        margin-left: 0 !important;
    }
} */
