/**
 * Vatamam — Notification Center Styles
 * Notification bell, dropdown, tab panel, admin page
 */

/* ════════════════════════════════════════════════
   BELL ICON IN WELCOME CARD
════════════════════════════════════════════════ */
.vt-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.vt-bell-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 7px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  text-decoration: none;
}

.vt-bell-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.vt-bell-icon {
  font-size: 17px;
  line-height: 1;
}

.vt-bell-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  line-height: 1;
}

.vt-bell-badge.hidden {
  display: none;
}

/* ════════════════════════════════════════════════
   NOTIFICATION TAB — IMPROVED PANEL
════════════════════════════════════════════════ */
.vt-notif-center {
  direction: rtl;
}

.vt-notif-center .vt-nc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}

.vt-notif-center .vt-nc-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vt-nc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vt-nc-btn {
  padding: 5px 14px;
  background: #f1f5f9;
  color: #374151;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vt-nc-btn:hover {
  background: #e2e8f0;
  color: #1f2937;
}

/* ── Filter tabs (All / Unread / Read) ── */
.vt-nc-filter-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  overflow-x: auto;
}

.vt-nc-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: #f3f4f6;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  white-space: nowrap;
}

.vt-nc-filter:hover {
  background: #e5e7eb;
}

.vt-nc-filter.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.vt-nc-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: rgba(0,0,0,0.10);
  color: inherit;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  line-height: 1;
}

.vt-nc-filter.active .vt-nc-filter-count {
  background: rgba(255,255,255,0.25);
}

.vt-nc-filter-count.unread {
  background: #ef4444;
  color: #fff;
}

.vt-nc-filter.active .vt-nc-filter-count.unread {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* Date group header */
.vt-notif-group-label {
  padding: 8px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
}

/* Individual notification row */
.vt-nc-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
  position: relative;
}

.vt-nc-row:last-child {
  border-bottom: none;
}

.vt-nc-row.unread {
  background: #fafbff;
}

.vt-nc-row:hover {
  background: #f8fafc;
}

.vt-nc-row .nc-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
}

.vt-nc-row .nc-body {
  flex: 1;
  min-width: 0;
}

.vt-nc-row .nc-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.vt-nc-row .nc-unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  flex-shrink: 0;
}

.vt-nc-row .nc-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.vt-nc-row .nc-msg {
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.6;
  margin: 0 0 6px;
}

.vt-nc-row .nc-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vt-nc-row .nc-time {
  font-size: 11px;
  color: #9ca3af;
}

.vt-nc-row .nc-view-btn {
  padding: 4px 12px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.vt-nc-row .nc-view-btn:hover {
  background: #dbeafe;
  color: #1e40af;
}

.antique-expert-panel .vt-nc-row .nc-view-btn {
  background: #ecfdf5;
  color: #059669;
  border-color: #d1fae5;
}

.antique-expert-panel .vt-nc-row .nc-view-btn:hover {
  background: #d1fae5;
  color: #065f46;
}

.vt-nc-row .nc-read-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}

.vt-nc-row .nc-read-btn:hover {
  color: #4b5563;
}

/* Empty state */
.vt-nc-empty {
  padding: 48px 20px;
  text-align: center;
}

.vt-nc-empty .vt-es-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.vt-nc-empty h3 {
  font-size: 15px;
  font-weight: 700;
  color: #6b7280;
  margin: 0 0 6px;
}

.vt-nc-empty p {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
}

/* ════════════════════════════════════════════════
   ADMIN NOTIFICATION CENTER PAGE
════════════════════════════════════════════════ */
.vt-admin-notif-wrap {
  direction: rtl;
  max-width: 900px;
  margin: 20px auto;
  font-family: 'Vazirmatn', 'IRANYekan', Tahoma, sans-serif;
}

.vt-admin-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.vt-admin-notif-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vt-admin-notif-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.vt-admin-notif-filter-btn {
  padding: 6px 16px;
  background: #f3f4f6;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}

.vt-admin-notif-filter-btn:hover,
.vt-admin-notif-filter-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.vt-admin-notif-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 16px;
}

.vt-admin-nc-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.vt-admin-nc-row:last-child {
  border-bottom: none;
}

.vt-admin-nc-row.unread {
  background: #fffbeb;
  border-right: 3px solid #f59e0b;
}

.vt-admin-nc-row:hover {
  background: #f9fafb;
}

.vt-admin-nc-row .anc-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.vt-admin-nc-row .anc-body {
  flex: 1;
  min-width: 0;
}

.vt-admin-nc-row .anc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.vt-admin-nc-row .anc-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
}

.vt-admin-nc-row .anc-user-badge {
  font-size: 11px;
  font-weight: 600;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 10px;
  padding: 2px 8px;
}

.vt-admin-nc-row .anc-msg {
  font-size: 12.5px;
  color: #4b5563;
  margin: 0 0 6px;
  line-height: 1.6;
}

.vt-admin-nc-row .anc-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vt-admin-nc-row .anc-time {
  font-size: 11px;
  color: #9ca3af;
}

.vt-admin-nc-row .anc-view-btn {
  padding: 4px 12px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
  cursor: pointer;
  font-family: inherit;
}

.vt-admin-nc-row .anc-view-btn:hover {
  background: #dbeafe;
  color: #1e40af;
}

.vt-admin-nc-row .anc-delete-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  line-height: 1;
}

.vt-admin-nc-row .anc-delete-btn:hover {
  color: #ef4444;
}

/* Pagination */
.vt-notif-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.vt-notif-pagination .pg-btn {
  padding: 6px 14px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}

.vt-notif-pagination .pg-btn:hover,
.vt-notif-pagination .pg-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Admin notification badge in menu */
.vt-admin-notif-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  margin-right: 5px;
  vertical-align: middle;
  line-height: 1;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .vt-nc-row {
    padding: 11px 14px;
    gap: 10px;
  }
  .vt-nc-row .nc-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  .vt-admin-nc-row {
    padding: 12px 14px;
    gap: 10px;
  }
  .vt-admin-notif-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .vt-bell-btn span.vt-bell-label {
    display: none;
  }
}

/* ════════════════════════════════════════════════
   CLOSABLE POPUP / TOAST — post-action feedback
   (replaces raw browser alert() after status changes,
   opinion actions, assign/unassign, payments, etc.)
════════════════════════════════════════════════ */
.vt-toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(94vw, 520px);
  pointer-events: none;
}

body.wp-admin .vt-toast-container {
  top: 52px;
}

@media (max-width: 782px) {
  body.wp-admin .vt-toast-container {
    top: 66px;
  }
}

.vt-toast {
  direction: rtl;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #d8dde5;
  border-right: 6px solid #2563eb;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
  font-family: 'Vazirmatn', 'IRANYekan', 'IRANSans', Tahoma, sans-serif;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.vt-toast.vt-toast-in {
  opacity: 1;
  transform: translateY(0);
}

.vt-toast.vt-toast-out {
  opacity: 0;
  transform: translateY(-8px);
}

/* پس‌زمینهٔ کم‌رنگ هم‌رنگ نوع پیام، تا موفق/خطا در یک نگاه از هم جدا باشند
   (فقط نوار کناری رنگی کافی نبود و کاربر تفاوت را تشخیص نمی‌داد). */
.vt-toast-success { border-right-color: #059669; background: #f0fdf6; border-color: #a7e8c8; }
.vt-toast-error   { border-right-color: #dc2626; background: #fef4f4; border-color: #f3b6b6; }
.vt-toast-warning { border-right-color: #d97706; background: #fffbeb; border-color: #f3d08a; }
.vt-toast-info    { border-right-color: #2563eb; background: #f3f8ff; border-color: #b3ccf5; }

.vt-toast-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: #2563eb;
}

.vt-toast-success .vt-toast-icon { background: #059669; }
.vt-toast-error   .vt-toast-icon { background: #dc2626; }
.vt-toast-warning .vt-toast-icon { background: #d97706; }
.vt-toast-info    .vt-toast-icon { background: #2563eb; }

/* عنوان کوچک نوع پیام بالای متن — «موفق / خطا / هشدار» */
.vt-toast-body { flex: 1; min-width: 0; }
.vt-toast-title {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 2px;
  letter-spacing: 0;
}
.vt-toast-success .vt-toast-title { color: #047857; }
.vt-toast-error   .vt-toast-title { color: #b91c1c; }
.vt-toast-warning .vt-toast-title { color: #b45309; }
.vt-toast-info    .vt-toast-title { color: #1d4ed8; }

/* متن پیام — بزرگ‌تر و پررنگ‌تر از قبل.
   نسخهٔ قبلی ۱۳px با رنگ خاکستری بود و روی صفحه‌های شلوغ ادمین عملاً خوانده
   نمی‌شد؛ مخصوصاً پیام‌های چندخطی وضعیت پرداخت. */
.vt-toast-msg {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.9;
  color: #0f172a;
  padding-top: 2px;
  white-space: pre-line;
  word-break: break-word;
}

.vt-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  margin-top: 1px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.vt-toast-close:hover {
  color: #374151;
  background: #f3f4f6;
}

@media (max-width: 600px) {
  .vt-toast-container {
    width: 94vw;
  }
  .vt-toast {
    padding: 10px 12px;
  }
}
