/* Header User Bar — modern redesign override */

/* Override float layout with flexbox */
.block-with-logo .wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.block-with-logo {
    padding: 8px 10px;
}

/* Logo */
.block-with-logo__logo {
    height: 36px;
    flex-shrink: 0;
}

/* Guest buttons — push right */
.header-guest {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-guest .block-with-logo__authoriz-block {
    float: none;
    margin-left: 0;
}

/* Burger button — opens cabinet popup */
.header-user__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    transition: background-color .15s, border-color .15s, color .15s;
    flex-shrink: 0;
    cursor: pointer;
}

.header-user__burger:hover {
    background: #ea5e00;
    border-color: #ea5e00;
    color: #fff;
}

/* Push right section to the end */
.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    position: relative;
}

/* Icon buttons — chat & messenger */
.header-user__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #9a9a9a;
    font-size: 18px;
    transition: background-color .15s, color .15s;
    text-decoration: none;
    float: none;
    line-height: 1;
}

.header-user__icon:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.header-user__icon.active {
    color: #ea5e00;
}

.header-user__icon.active::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ea5e00;
    border-radius: 50%;
    border: 2px solid #1e1e1e;
}

/* Divider between icons and profile */
.header-user__divider {
    width: 1px;
    height: 24px;
    background: #333;
    flex-shrink: 0;
}

/* Profile trigger area */
.header-user__profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: background-color .15s;
}

.header-user__profile:hover {
    background-color: #2a2a2a;
}

/* Avatar */
.header-user__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3a3a3a;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
    transition: border-color .15s;
}

.header-user__avatar:hover {
    border-color: #ea5e00;
}

/* User info (name + badges row) */
.header-user__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.header-user__name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.header-user__badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Balance badge */
.header-user__balance {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #1681b2;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.4;
    cursor: default;
    white-space: nowrap;
}

/* Rating badge */
.header-user__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

.header-user__rating-value {
    color: #ea5e00;
    font-weight: 600;
}

/* Chevron */
.header-user__chevron {
    color: #666;
    font-size: 12px;
    transition: transform .2s;
    flex-shrink: 0;
}

.header-user__profile:hover .header-user__chevron {
    color: #999;
}


/* Dropdown */
.header-user__dropdown.private-enter__menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 12px 0 6px;
    z-index: 100;
    list-style: none;
    margin: 0;
    width: auto;
}

/* Invisible bridge so cursor can travel from profile to dropdown */
.header-user__dropdown.private-enter__menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.header-user__profile:hover .header-user__dropdown.private-enter__menu {
    display: block;
}

.header-user__dropdown.private-enter__menu li {
    margin: 0;
}

.header-user__dropdown .private-enter__menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: background-color .1s;
    white-space: nowrap;
}

.header-user__dropdown .private-enter__menu-item:hover {
    background-color: #f5f5f5;
    color: #111;
}

.header-user__dropdown .private-enter__menu-item .fa {
    width: 18px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.header-user__dropdown .private-enter__menu-item:hover .fa {
    color: #ea5e00;
}

/* Logout separator */
.header-user__dropdown li:last-child {
    border-top: 1px solid #eee;
    margin-top: 4px;
    padding-top: 4px;
}

/* ---- Mobile ---- */
/* Balance visibility toggle */
.header-user__balance-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #9a9a9a;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .15s, color .15s;
    flex-shrink: 0;
}

.header-user__balance-toggle:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.header-user__balance-toggle.is-hidden {
    color: #555;
}

.header-user.balance-hidden .header-user__balance {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}

@media (max-width: 760px) {
    .header-user__name,
    .header-user__chevron,
    .header-user__divider {
        display: none;
    }

    .header-user__badges {
        display: none;
    }

    .header-user__balance--mobile {
        display: inline-flex !important;
    }

    .header-user__profile {
        padding: 4px;
    }

    .header-user__icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .header-user__avatar {
        width: 30px;
        height: 30px;
    }

    .header-user {
        gap: 4px;
    }

    /* On mobile, dropdown needs to be wide enough */
    .header-user__dropdown.private-enter__menu {
        min-width: 200px;
        right: -8px;
    }
}
