/* === СТИЛІ ЦЕНТРУ СПОВІЩЕНЬ (ДЗВІНОЧОК) === */

.referral-bell-item {
    position: relative !important;
}

.referral-bell-toggle {
    position: relative !important;
    padding: 6px 12px !important;
    font-size: 16px !important;
    color: #f1f5f9 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
}

.referral-bell-toggle:hover,
.referral-bell-toggle:focus,
.referral-bell-item.open .referral-bell-toggle {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Бейдж лічильника */
.referral-bell-counter {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    border-radius: 9px;
    text-align: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.4);
    pointer-events: none;
    border: 1.5px solid #1e293b;
    animation: bellPulse 2s infinite ease-in-out;
}

@keyframes bellPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Випадаюче вікно сповіщень */
.referral-bell-dropdown {
    width: 360px !important;
    max-width: 95vw !important;
    padding: 0 !important;
    margin: 8px 0 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    z-index: 10000 !important;
    right: 0 !important;
    left: auto !important;
}

/* Шапка меню */
.referral-bell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.referral-bell-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-bell-title i {
    color: #3b82f6;
}

.referral-bell-mark-all {
    background: none;
    border: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.referral-bell-mark-all:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Список сповіщень */
.referral-bell-list {
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.referral-bell-list::-webkit-scrollbar {
    width: 5px;
}

.referral-bell-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.referral-bell-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.referral-bell-item-row {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
}

.referral-bell-item-row:hover {
    background-color: #f8fafc !important;
}

.referral-bell-item-row.unread {
    background-color: #f0fdf4 !important;
}

.referral-bell-item-row.unread:hover {
    background-color: #e6f9ed !important;
}

.referral-bell-item-row.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.5px;
    background: #10b981;
}

.referral-bell-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

.referral-bell-icon-box.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.referral-bell-icon-box.badge-purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.referral-bell-icon-box.badge-gold {
    background: #fef3c7;
    color: #b45309;
}

.referral-bell-icon-box.badge-warning {
    background: #ffedd5;
    color: #c2410c;
}

.referral-bell-icon-box.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.referral-bell-content {
    flex: 1;
    min-width: 0;
}

.referral-bell-item-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 3px;
    word-break: break-word;
}

.referral-bell-item-msg {
    font-size: 11.5px;
    color: #475569;
    line-height: 1.4;
    word-break: break-word;
}

.referral-bell-item-msg b {
    color: #1e293b;
}

.referral-bell-item-msg code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 11px;
}

.referral-bell-item-time {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Порожній стан */
.referral-bell-empty {
    padding: 36px 20px;
    text-align: center;
    color: #94a3b8;
}

.referral-bell-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.referral-bell-empty p {
    font-size: 13px;
    margin: 0;
}

/* Футер меню */
.referral-bell-footer {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.referral-bell-link {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.referral-bell-link:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* Адаптивність для смартфонів */
@media (max-width: 767px) {
    /* Випадаюче вікно сповіщень */
    .referral-bell-dropdown {
        width: 320px !important;
        max-width: calc(100vw - 20px) !important;
        position: fixed !important;
        top: 50px !important;
        right: 10px !important;
        left: auto !important;
    }

    /* Кнопка гамбургер-меню: зсуваємо вліво для звільнення робочого простору */
    .btn-hamburger {
        left: 8px !important;
    }

    /* Верхнє меню: компактні відступи, блокування переносу та захисна максимальна ширина */
    #menu-strip #main-top {
        margin: 4px 6px 0 0 !important;
        max-width: calc(100vw - 65px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
    }

    /* Компактний дзвіночок на смартфонах */
    .referral-bell-toggle {
        padding: 6px 8px !important;
    }

    /* Компактні посилання елементів верхнього меню */
    #main-top > li > a {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    /* Вертикальне вирівнювання іконки, імені та стрілочки профілю */
    #main-top .dropdown-toggle.main-top {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
    }

    /* Скорочення занадто довгого імені/режиму користувача з трикрапкою (...) */
    #main-top .dropdown-toggle.main-top b:first-of-type {
        max-width: 140px !important;
        display: inline-block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
    }
}

