/* ==========================================================================
   VikSale — Стили уведомлений
   Путь: /css/notifications.css
   - Колокольчик в шапке с бейджем
   - Dropdown со списком последних 10
   - Страница /account/notifications
   Светлая + тёмная темы.
   ========================================================================== */

/* ---------- Колокольчик в шапке ----------
   UNIFIED-BELL 2026-10-09: колокольчик использует общий стиль .auth-icon-btn
   (как 4 соседние иконки: Профиль, Избранное, Сообщения, Выход).
   Здесь только обёртка для позиционирования dropdown и бейджа. */
.notif-bell-wrap {
    position: relative;
    display: inline-flex;
}

/* Бейдж — вынесен ЗА пределы кнопки (в HTML), поэтому не обрезается clip-path */
.notif-bell-wrap .notif-bell__badge {
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    z-index: 3 !important;
    pointer-events: none !important;
}

/* Бейдж */
.notif-bell__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg-primary, #1e1e3a);
    pointer-events: none;
}
body.light-theme .notif-bell__badge {
    box-shadow: 0 0 0 2px #ffffff;
}

/* ---------- Dropdown ---------- */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 24px);
    background: #26264f;
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    z-index: 9999;
    overflow: hidden;
}
body.light-theme .notif-dropdown {
    background: #ffffff;
    border-color: rgba(23, 24, 47, 0.10);
    box-shadow: 0 20px 48px rgba(23, 24, 47, 0.18);
}
.notif-dropdown[hidden] { display: none; }

.notif-dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.light-theme .notif-dropdown__head {
    border-bottom-color: rgba(23, 24, 47, 0.08);
}
.notif-dropdown__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #f0f0ff);
}
body.light-theme .notif-dropdown__title { color: #17182f; }
.notif-dropdown__mark-all {
    font-size: 12px;
    color: var(--neon-cyan, #94adae);
    background: none;
    border: 0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.15s ease;
}
.notif-dropdown__mark-all:hover {
    background: rgba(108, 99, 255, 0.10);
    color: var(--primary, #6C63FF);
}
body.light-theme .notif-dropdown__mark-all { color: #0369a1; }

.notif-dropdown__list {
    max-height: 400px;
    overflow-y: auto;
}

/* ---------- Элемент ---------- */
.ntf-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
    position: relative;
}
.ntf-item:last-child { border-bottom: 0; }
.ntf-item:hover { background: rgba(108, 99, 255, 0.06); }
body.light-theme .ntf-item {
    border-bottom-color: rgba(23, 24, 47, 0.06);
}
body.light-theme .ntf-item:hover { background: rgba(91, 82, 224, 0.04); }

.ntf-item:not(.is-read)::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
}

.ntf-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: rgba(108, 99, 255, 0.14);
    color: var(--primary, #6C63FF);
}
.ntf-item__icon::before {
    content: '🔔';
    line-height: 1;
}
.ntf-item__icon[data-ntf-type="review.new"]::before { content: '⭐'; }
.ntf-item__icon[data-ntf-type="review.new"] {
    background: rgba(255, 215, 0, 0.14);
    color: #ffd700;
}
.ntf-item__icon[data-ntf-type="review.reply"]::before { content: '💬'; }
.ntf-item__icon[data-ntf-type="review.reply"] {
    background: rgba(57, 217, 138, 0.14);
    color: #10b981;
}
.ntf-item__icon[data-ntf-type="review.published"]::before { content: '✅'; }
.ntf-item__icon[data-ntf-type="review.published"] {
    background: rgba(57, 217, 138, 0.14);
    color: #10b981;
}
.ntf-item__icon[data-ntf-type="review.rejected"]::before { content: '⚠️'; }
.ntf-item__icon[data-ntf-type="review.rejected"] {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
.ntf-item__icon[data-ntf-type="ad.approved"]::before { content: '✅'; }
.ntf-item__icon[data-ntf-type="ad.rejected"]::before { content: '⚠️'; }
.ntf-item__icon[data-ntf-type="message.new"]::before { content: '✉️'; }
.ntf-item__icon[data-ntf-type="message.new"] {
    background: rgba(0, 217, 255, 0.12);
    color: #00d9ff;
}

.ntf-item__body {
    flex: 1;
    min-width: 0;
}
.ntf-item__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary, #f0f0ff);
    margin-bottom: 3px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.ntf-item.is-read .ntf-item__title {
    color: var(--text-secondary, #c9c9d6);
    font-weight: 500;
}
body.light-theme .ntf-item__title { color: #17182f; }
body.light-theme .ntf-item.is-read .ntf-item__title { color: #4a5568; }

.ntf-item__text {
    font-size: 12.5px;
    color: var(--text-secondary, #9aa0c3);
    line-height: 1.45;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}
body.light-theme .ntf-item__text { color: #5a6172; }

.ntf-item__date {
    font-size: 11px;
    color: var(--text-muted, #6a6f80);
}

/* Пусто */
.ntf-empty {
    padding: 40px 20px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted, #9aa0c3);
}
.ntf-empty i {
    display: block;
    font-size: 26px;
    margin-bottom: 8px;
    opacity: 0.6;
}
.ntf-empty--error { color: #ef4444; }

/* Низ dropdown — ссылка */
.notif-dropdown__footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
body.light-theme .notif-dropdown__footer {
    border-top-color: rgba(23, 24, 47, 0.08);
}
.notif-dropdown__footer a {
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-cyan, #94adae);
    text-decoration: none;
}
.notif-dropdown__footer a:hover {
    color: var(--primary, #6C63FF);
}
body.light-theme .notif-dropdown__footer a { color: #0369a1; }

/* Адаптив */
@media (max-width: 520px) {
    .notif-dropdown {
        position: fixed;
        top: 60px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}