/* ========================================
   CABINET HEADER STYLES
   Стили шапки личного кабинета
   ======================================== */

/* === USER AVATAR & AUTH LINK === */

.header-user-avatar,
.header-auth-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.header-user-avatar {
    background: rgba(41, 96, 135, 0.4);
}

.header-user-avatar img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.header-auth-link {
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 20px 20px !important;
}

.header-help {
    background-image: url("../images/question.svg") !important;
}

.header-home {
    background-image: url("../images/home.svg") !important;
}

/* === HELP TOOLTIP === */

.header-help-wrapper {
    position: relative;
    display: inline-block;
}

/* HEADER TOOLTIP (наследует базовые стили из popups.css) */
.header-help-tooltip {
    /* Размеры и позиционирование (уникальные) */
    top: 100%;
    right: 0;
    margin-top: 12px;
    width: 468px;
    padding: 24px;
    border-radius: 32px;
    
    /* Текст (уникальные) */
    font-size: 16px;
    line-height: 24px;
}

.header-help-tooltip a {
    color: var(--blue);
    text-decoration: none;
}

.header-help-tooltip a:hover {
    text-decoration: underline;
}

.header-help-wrapper:hover .header-help-tooltip {
    opacity: 1;
    visibility: visible;
}

/* === DISABLED STATE (when help tooltip active) === */

body.help-tooltip-active .btn-dashboard-glass,
body.help-tooltip-active .btn-dashboard-exchange,
body.help-tooltip-active .btn-dashboard-remit,
body.help-tooltip-active .btn-dashboard-template,
body.help-tooltip-active .show-all-link,
body.help-tooltip-active .btn,
body.help-tooltip-active .cabinet-menu li a,
body.help-tooltip-active .list li,
body.help-tooltip-active .asset-item {
    pointer-events: none;
    opacity: 0.5;
}


/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    /* Header help tooltip */
    .header-help-tooltip {
        width: calc(100vw - 48px);
        max-width: 400px;
        right: -12px;
        padding: 20px;
        border-radius: 24px;
        font-size: 15px;
        line-height: 22px;
    }
}

@media (max-width: 520px) {
    /* User avatar */
    .header-user-avatar,
    .header-auth-link {
        width: 36px;
        height: 36px;
    }
    
    .header-auth-link {
        background-size: 18px 18px !important;
    }
    
    /* Header help tooltip */
    .header-help-tooltip {
        width: calc(100vw - 32px);
        max-width: none;
        right: -8px;
        padding: 16px;
        border-radius: 20px;
        font-size: 14px;
        line-height: 20px;
    }
}
