/* ══════════════════════════════════════════════════════════════════════
   Notification Bell — dv-notif-*
   Notification Center — /notifications page
   Added: 2026-06-05
   ══════════════════════════════════════════════════════════════════════ */

/* ── Wrapper ──────────────────────────────────────────────────────── */
.dv-notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ── Bell button ──────────────────────────────────────────────────── */
.dv-notif-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #4b5563;
    transition: background 0.18s, color 0.18s;
    padding: 0;
}
.dv-notif-btn:hover,
.dv-notif-btn:focus {
    background: #f3f4f6;
    color: #2563eb;
    outline: none;
}

/* ── Badge ────────────────────────────────────────────────────────── */
.dv-notif-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
    border: 2px solid #fff;
    transition: transform 0.2s;
}
.dv-notif-badge--hidden {
    display: none !important;
}

/* ── Dropdown panel ───────────────────────────────────────────────── */
.dv-notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border: 1px solid #DDDDDD;
    border-radius: 16px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    z-index: 9999;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    direction: rtl;
    font-family: 'iransansxv', inherit;
}
.dv-notif-panel--open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Panel header ─────────────────────────────────────────────────── */
.dv-notif-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 13px;
    border-bottom: 1px solid #F3F4F6;
    flex-shrink: 0;
}
.dv-notif-panel__title {
    font-size: 15px;
    font-weight: 700;
    color: #000;
}
.dv-notif-panel__mark-all {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: rgb(37,60,137);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    font-family: inherit;
}
.dv-notif-panel__mark-all:hover {
    background: rgb(229,233,244);
}

/* ── Body (scrollable) ────────────────────────────────────────────── */
.dv-notif-panel__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.dv-notif-panel__body::-webkit-scrollbar { width: 4px; }
.dv-notif-panel__body::-webkit-scrollbar-track { background: transparent; }
.dv-notif-panel__body::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 4px;
}

/* ── Notification item ────────────────────────────────────────────── */
.dv-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}
.dv-notif-item:last-child { border-bottom: none; }
.dv-notif-item:hover { background: #F9FAFB; }

.dv-notif-item--unread { background: rgb(229,233,244); }
.dv-notif-item--unread:hover { background: rgb(210,218,240); }

/* Icon */
.dv-notif-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-notif-item__body { flex: 1; min-width: 0; }
.dv-notif-item__title {
    font-size: 13px;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dv-notif-item__text {
    font-size: 12px;
    color: #717171;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dv-notif-item__time {
    font-size: 11px;
    color: #B0B0B0;
    margin-top: 4px;
}

/* Unread dot */
.dv-notif-item__dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgb(37,60,137);
    margin-top: 7px;
}
.dv-notif-item--read .dv-notif-item__dot { background: transparent; }

/* ── States ───────────────────────────────────────────────────────── */
.dv-notif-panel__empty,
.dv-notif-panel__loading {
    padding: 40px 16px;
    text-align: center;
    font-size: 13px;
    color: #B0B0B0;
    direction: rtl;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.dv-notif-panel__foot {
    border-top: 1px solid #F3F4F6;
    flex-shrink: 0;
}
.dv-notif-panel__view-all {
    display: block;
    padding: 13px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: rgb(37,60,137);
    text-decoration: none;
    transition: background 0.15s ease;
}
.dv-notif-panel__view-all:hover {
    background: rgb(229,233,244);
    text-decoration: none;
    color: rgb(30,48,110);
}

/* ══════════════════════════════════════════════════════════════════════
   Notification Center Page (/notifications)
   ══════════════════════════════════════════════════════════════════════ */

.dv-notif-page {
    max-width: 720px;
    margin: 32px auto;
    padding: 0 16px 60px;
    direction: rtl;
}

.dv-notif-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.dv-notif-page__title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.dv-notif-page__actions button {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.dv-notif-page__actions button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Card list */
.dv-notif-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: inherit;
}
.dv-notif-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.dv-notif-card--unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.dv-notif-card__dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 5px;
}
.dv-notif-card--read .dv-notif-card__dot {
    background: #e5e7eb;
}
.dv-notif-card__body {
    flex: 1;
    min-width: 0;
}
.dv-notif-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}
.dv-notif-card__text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}
.dv-notif-card__time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.dv-notif-page__empty {
    text-align: center;
    padding: 60px 16px;
    color: #9ca3af;
    font-size: 15px;
}

/* ══════════════════════════════════════════════════════════════════════
   Push Permission Banner
   ══════════════════════════════════════════════════════════════════════ */

.dv-push-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 32px));
    width: calc(100% - 32px);
    max-width: 560px;
    z-index: 10500;
    background: #fff;
    border: 1px solid #DDDDDD;
    border-radius: 16px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    direction: rtl;
    font-family: 'iransansxv', inherit;
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}
.dv-push-banner--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.dv-push-banner__icon-wrap {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgb(229, 233, 244);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dv-push-banner__icon-wrap svg {
    width: 22px;
    height: 22px;
    color: rgb(37, 60, 137);
}
.dv-push-banner__text {
    flex: 1;
    min-width: 0;
}
.dv-push-banner__title {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2px;
    line-height: 1.4;
}
.dv-push-banner__desc {
    font-size: 12px;
    color: #717171;
    line-height: 1.5;
}
.dv-push-banner__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}
.dv-push-banner__btn-allow {
    background: linear-gradient(135deg, rgb(37, 60, 137) 0%, rgb(45, 75, 170) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
}
.dv-push-banner__btn-allow:hover {
    background: linear-gradient(135deg, rgb(30, 48, 110) 0%, rgb(37, 60, 137) 100%);
    transform: scale(1.02);
}
.dv-push-banner__btn-later {
    background: #fff;
    color: #222222;
    border: 1px solid #B0B0B0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
}
.dv-push-banner__btn-later:hover {
    background: #F7F7F7;
    border-color: #222222;
}

@media (max-width: 540px) {
    .dv-push-banner {
        bottom: 16px;
        width: calc(100% - 24px);
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 12px;
        border-radius: 14px;
    }
    .dv-push-banner__actions {
        width: 100%;
    }
    .dv-push-banner__btn-allow,
    .dv-push-banner__btn-later {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }
}

/* ── Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dv-notif-panel {
        position: fixed;
        top: calc(var(--header-height-mobile, 64px) + 8px);
        left: 8px;
        right: 8px;
        width: auto;
        max-height: calc(100dvh - var(--header-height-mobile, 64px) - 24px);
        border-radius: 14px;
        transform: translateY(-12px) scale(0.97);
    }
    .dv-notif-panel--open {
        transform: translateY(0) scale(1);
    }
}
