/* ============================================================
   notifications.css — Module 19: Notification Centre
   All styles namespaced under .notif-* or .nc-*
   ============================================================ */

/* ─── Page wrapper ──────────────────────────────────────────── */
.nc-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ─── Header toolbar row ────────────────────────────────────── */
.nc-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nc-filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.nc-pill {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--color-border-dark);
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nc-pill:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border-color: #818cf8;
}

.nc-pill.active {
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    border-color: #818cf8;
}

.nc-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #6366f1;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    margin-left: 0.4rem;
    line-height: 1;
}

/* ─── Stats strip ───────────────────────────────────────────── */
.nc-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nc-stat-card {
    flex: 1;
    min-width: 140px;
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border-dark);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.nc-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nc-stat-icon.unread  { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.nc-stat-icon.total   { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.nc-stat-icon.today   { background: rgba(34, 211, 238, 0.12); color: #22d3ee; }

.nc-stat-info { display: flex; flex-direction: column; gap: 0.15rem; }

.nc-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1;
}

.nc-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* ─── Notification list ─────────────────────────────────────── */
.nc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nc-item {
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border-dark);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.nc-item:hover {
    background: rgba(248, 250, 252, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Unread items get a left accent bar */
.nc-item.unread {
    border-left: 3px solid #6366f1;
}

.nc-item.unread .nc-item-title {
    color: #f1f5f9;
    font-weight: 600;
}

/* ── Type icon ─────────────────────────────────────────────── */
.nc-type-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.nc-type-icon.credit-warning   { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.nc-type-icon.credit-exhausted { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.nc-type-icon.bulk-complete    { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.nc-type-icon.bulk-failed      { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.nc-type-icon.plan-expiring    { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.nc-type-icon.invoice-paid     { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.nc-type-icon.invoice-failed   { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.nc-type-icon.webhook-failed   { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.nc-type-icon.gen-complete     { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.nc-type-icon.info             { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }

/* ── Content ───────────────────────────────────────────────── */
.nc-item-content {
    flex: 1;
    min-width: 0;
}

.nc-item-title {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

.nc-item-body {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.nc-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nc-item-time {
    font-size: 0.75rem;
    color: #475569;
}

.nc-type-label {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nc-type-label.credit-warning   { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.nc-type-label.credit-exhausted { background: rgba(239,68,68,0.12);   color: #ef4444; }
.nc-type-label.bulk-complete    { background: rgba(34,197,94,0.12);   color: #22c55e; }
.nc-type-label.bulk-failed      { background: rgba(239,68,68,0.12);   color: #ef4444; }
.nc-type-label.plan-expiring    { background: rgba(249,115,22,0.12);  color: #f97316; }
.nc-type-label.invoice-paid     { background: rgba(34,197,94,0.12);   color: #22c55e; }
.nc-type-label.invoice-failed   { background: rgba(239,68,68,0.12);   color: #ef4444; }
.nc-type-label.webhook-failed   { background: rgba(239,68,68,0.12);   color: #ef4444; }
.nc-type-label.gen-complete     { background: rgba(99,102,241,0.12);  color: #818cf8; }
.nc-type-label.info             { background: rgba(148,163,184,0.10); color: #94a3b8; }

/* ── Actions ───────────────────────────────────────────────── */
.nc-item-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.nc-item:hover .nc-item-actions {
    opacity: 1;
}

.nc-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-size: 1rem;
}

.nc-action-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.nc-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* ── Action URL link ────────────────────────────────────────── */
.nc-action-link {
    font-size: 0.75rem;
    color: #818cf8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: color 0.15s;
}

.nc-action-link:hover { color: #a5b4fc; text-decoration: underline; }

/* ─── Unread dot ─────────────────────────────────────────────── */
.nc-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    flex-shrink: 0;
    margin-top: 0.35rem;
}

/* ─── Empty state ───────────────────────────────────────────── */
.nc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #64748b;
    gap: 0.75rem;
}

.nc-empty .material-symbols-outlined {
    font-size: 3rem;
    color: #334155;
}

.nc-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
    margin: 0;
}

.nc-empty-sub {
    font-size: 0.85rem;
    margin: 0;
}

/* ─── Loading skeleton ──────────────────────────────────────── */
.nc-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nc-skeleton-row {
    height: 72px;
    border-radius: 10px;
    background: linear-gradient(90deg, #1e293b 25%, #263147 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: ncShimmer 1.4s infinite;
}

@keyframes ncShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Error banner ──────────────────────────────────────────── */
.nc-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    color: #fca5a5;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.nc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.nc-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border-radius: 7px;
    border: 1px solid var(--color-border-dark);
    background: var(--color-surface-dark);
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nc-page-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border-color: #818cf8;
}

.nc-page-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

.nc-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.nc-page-info {
    font-size: 0.78rem;
    color: #475569;
    white-space: nowrap;
}
