﻿/*
 * notifications.css — سیستم اعلانات فیلمینجو
 */

/* ================================================
   Badge زنگوله
   ================================================ */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
    border: 2px solid #222222;
}

/* ================================================
   Dropdown
   ================================================ */
.notif-dropdown {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    direction: rtl;
    box-shadow:
        0 0 0 1px rgba(0,140,255,0.06),
        0 20px 60px rgba(0,0,0,0.6),
        0 8px 24px rgba(0,0,0,0.4);
}

.notif-dropdown--open {
    opacity: 1;
    transform: translateY(0);
}

/* هدر dropdown */
.notif-dd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,140,255,0.04);
}

.notif-dd-title {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 7px;
}

.notif-dd-count {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notif-dd-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.notif-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #008CFF;
    padding: 5px 8px;
    border-radius: 8px;
    transition: background 0.12s;
    text-decoration: none;
    white-space: nowrap;
}
.notif-action-btn:hover  { background: rgba(0,140,255,0.1); }
.notif-action-btn:disabled { color: #374151; background: none; cursor: default; }

.notif-action-sep {
    color: rgba(255,255,255,0.1);
    font-size: 14px;
    line-height: 1;
    user-select: none;
    padding: 0 1px;
}

/* لیست */
.notif-dd-list {
    max-height: 370px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
}
.notif-dd-list::-webkit-scrollbar { width: 3px; }
.notif-dd-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

/* ================================================
   آیتم اعلان — مشترک dropdown و صفحه
   ================================================ */
.notif-item {
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.12s;
}
.notif-item:last-child { border-bottom: none; }

.notif-item--unread {
    background: rgba(0,140,255,0.04);
}
.notif-item--unread::after {
    content: '';
    position: absolute;
    right: 0; top: 6px; bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #008CFF;
}
.notif-item--read { background: transparent; }
.notif-item:hover { background: rgba(255,255,255,0.03); }

.notif-item-inner {
    display: flex;
    gap: 11px;
    padding: 12px 16px 12px 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    align-items: flex-start;
}

.notif-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-type-icon { display: block; flex-shrink: 0; }

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

.notif-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.notif-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.notif-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #008CFF;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(0,140,255,0.7);
}

.notif-body {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 5px 0;
    word-break: break-word;
}

.notif-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    color: #008CFF;
    padding: 0;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    opacity: 0.75;
    transition: opacity 0.12s;
}
.notif-expand-btn:hover { opacity: 1; }

/* دکمه لینک داخل اعلان */
.notif-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
    padding: 3px 8px;
    background: rgba(0,140,255,0.1);
    border: 1px solid rgba(0,140,255,0.25);
    border-radius: 5px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    color: #008CFF;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.notif-link-btn:hover { background: rgba(0,140,255,0.2); border-color: rgba(0,140,255,0.45); }

.notif-time {
    font-size: 10.5px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
    margin-inline-start: auto;
}

/* empty */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 16px;
    color: #475569;
    font-size: 13px;
    text-align: center;
}

/* ================================================
   صفحه اعلانات
   ================================================ */
.notif-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 32px 16px 80px;
}

/* ── هدر صفحه ── */
.notif-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.notif-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notif-page-title h1 {
    font-size: 20px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.notif-page-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fbbf24;
}

.notif-page-mark-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,140,255,0.07);
    border: 1px solid rgba(0,140,255,0.18);
    border-radius: 10px;
    color: #008CFF;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.notif-page-mark-all:hover:not(:disabled) {
    background: rgba(0,140,255,0.13);
    border-color: rgba(0,140,255,0.3);
}
.notif-page-mark-all:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ── فیلتر ── */
.notif-filter-bar {
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    margin-bottom: 20px;
}

.notif-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    border-radius: 9px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    color: #475569;
    padding: 7px 16px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.notif-filter-btn:hover:not(.active) {
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
}
.notif-filter-btn.active {
    background: #1a1a1a;
    color: #008CFF;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.notif-filter-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(0,140,255,0.15);
    color: #008CFF;
    font-size: 10px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.notif-filter-btn:not(.active) .notif-filter-count {
    background: rgba(255,255,255,0.06);
    color: #475569;
}

/* ── تعداد ── */
.notif-page-count {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 14px;
}

/* ── لیست صفحه ── */
.notif-page-list {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
}

.notif-page-list .notif-item-inner  { padding: 15px 20px 15px 16px; }
.notif-page-list .notif-icon-wrap   { width: 42px; height: 42px; border-radius: 12px; }
.notif-page-list .notif-title       { font-size: 14px; white-space: normal; line-height: 1.4; }
.notif-page-list .notif-body        { font-size: 13px; color: #94a3b8; line-height: 1.7; }
.notif-page-list .notif-time        { font-size: 11.5px; color: #64748b; }
.notif-page-list .notif-item--unread::after { top: 8px; bottom: 8px; width: 3px; }

/* ── empty صفحه ── */
.notif-page-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 70px 16px;
    color: #475569;
    font-size: 13px;
    text-align: center;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
}
.notif-page-empty p { color: #64748b; line-height: 1.8; }

/* ================================================
   ریسپانسیو
   ================================================ */
@media (max-width: 600px) {
    .notif-page { padding: 20px 12px 100px; }

    .notif-page-title h1 { font-size: 17px; }
    .notif-page-icon { width: 36px; height: 36px; border-radius: 10px; }

    .notif-filter-bar { width: 100%; }
    .notif-filter-btn { flex: 1; justify-content: center; padding: 7px 8px; font-size: 12px; }

    .notif-page-list .notif-item-inner { padding: 13px 14px 13px 12px; }
    .notif-page-list .notif-icon-wrap  { width: 36px; height: 36px; border-radius: 10px; }
    .notif-page-list .notif-title      { font-size: 13px; }
    .notif-page-list .notif-body       { font-size: 12px; }
}

@media (max-width: 360px) {
    .notif-filter-count { display: none; }
    .notif-dd-title     { font-size: 12px; }
    .notif-action-btn   { font-size: 11px; padding: 4px 6px; }
}
