/* ═══════════════════════════════════════════════════════════
   🔔 Notification Center — Premium RTL
   ═══════════════════════════════════════════════════════════ */

/* ─── Bell Button ─── */
.notif-bell {
  position: relative;
  padding: 8px 12px;
  transition: all 0.2s;
}

.notif-bell .bell-icon {
  font-size: 15px;
  display: inline-block;
  transition: transform 0.3s;
}

.notif-bell:hover .bell-icon {
  animation: bell-ring 0.6s ease;
}

@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-5deg); }
}

.notif-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: linear-gradient(135deg, #ff4757, #ff3838);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid var(--panel-3, #0B1027);
}

.notif-badge.hidden {
  display: none;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   Dropdown
   ═══════════════════════════════════════════════════════════ */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 420px;
  max-width: calc(100vw - 20px);
  background: #0d142b;
  border: 1px solid #263453;
  border-radius: 18px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 10000;
  overflow: hidden;
  animation: notifIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top left;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
}

.notif-dropdown.hidden {
  display: none;
}

@keyframes notifIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════ */
.notif-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, #131c38 0%, #0d142b 100%);
}

.notif-symbol {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #203652, #172844);
  color: #00fdfd;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 4px 12px rgba(0, 253, 253, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.notif-heading {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.notif-heading-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.notif-heading-count {
  font-size: 11px;
  color: #9caac8;
  font-weight: 500;
}

.notif-heading-actions {
  flex-shrink: 0;
}

.notif-action-btn {
  padding: 6px 12px;
  border-radius: 9px;
  background: #1c2b46;
  border: 1px solid #263453;
  color: #74d9ed;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.notif-action-btn:hover:not(:disabled) {
  background: #283e60;
  border-color: #3a5278;
  color: #9be5f2;
}

.notif-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.notif-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: #a3afc7;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  font-family: inherit;
}

.notif-close-btn:hover {
  background: #3a263a;
  color: #fff;
  transform: rotate(90deg);
}

/* ─── Divider ─── */
.notif-divider {
  height: 1px;
  background: #263453;
  margin: 0 16px;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   List
   ═══════════════════════════════════════════════════════════ */
.notif-list {
  max-height: 440px;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: #354766 transparent;
}

.notif-list::-webkit-scrollbar {
  width: 6px;
}

.notif-list::-webkit-scrollbar-thumb {
  background: #354766;
  border-radius: 3px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
  background: #4c6181;
}

/* ═══════════════════════════════════════════════════════════
   Item
   ═══════════════════════════════════════════════════════════ */
.notif-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px 12px 12px 10px;
  border-radius: 14px;
  background: #141e38;
  border: 1px solid #263453;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: right;
  direction: rtl;
}

.notif-item:hover {
  transform: translateX(-2px);
  border-color: #334867;
  background: #182342;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.notif-item.unread {
  background: linear-gradient(90deg, #1a2946 0%, #141e38 100%);
  border-color: #334867;
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: var(--item-accent, #00fdfd);
  border-radius: 0 14px 14px 0;
  box-shadow: 0 0 8px var(--item-accent, #00fdfd);
}

/* ─── آیکن ─── */
.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--item-accent, #49c9e8);
  background: rgba(73, 201, 232, 0.1);
  border: 1px solid rgba(73, 201, 232, 0.2);
  transition: all 0.2s;
}

.notif-item.unread .notif-icon {
  background: rgba(73, 201, 232, 0.15);
  box-shadow: 0 0 12px rgba(73, 201, 232, 0.15);
}

/* ─── محتوا ─── */
.notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
  word-break: break-word;
}

.notif-item:not(.unread) .notif-title {
  font-weight: 600;
  color: #dbe1f0;
}

.notif-message {
  font-size: 11.5px;
  color: #9caac8;
  line-height: 1.7;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  gap: 8px;
}

.notif-time {
  font-size: 10.5px;
  color: #8292b3;
  font-weight: 500;
}

.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00fdfd;
  box-shadow: 0 0 8px #00fdfd;
  flex-shrink: 0;
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.85); }
}

/* ─── دکمه حذف ─── */
.notif-delete-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: #a3afc7;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}

.notif-item:hover .notif-delete-btn {
  display: flex;
}

.notif-delete-btn:hover {
  background: #473044;
  color: #ff728b;
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════
   Empty State
   ═══════════════════════════════════════════════════════════ */
.notif-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9caac8;
}

.notif-empty-icon {
  font-size: 50px;
  color: #647797;
  margin-bottom: 12px;
  animation: emptyPulse 3s infinite;
}

@keyframes emptyPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.notif-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.notif-empty-text {
  font-size: 11.5px;
  color: #9caac8;
}

/* ═══════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════ */
.notif-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 14px;
  background: linear-gradient(0deg, #131c38 0%, #0d142b 100%);
}

.notif-clear-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #9caac8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.notif-clear-btn:hover {
  background: #3a263a;
  color: #ff728b;
}

.notif-footer-brand {
  font-size: 10.5px;
  color: #7483a5;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .notif-dropdown {
    width: calc(100vw - 20px);
    left: -80px;
    border-radius: 14px;
  }

  .notif-header {
    padding: 12px 14px;
  }

  .notif-heading-title {
    font-size: 13.5px;
  }

  .notif-action-btn {
    font-size: 10px;
    padding: 5px 9px;
  }

  .notif-list {
    max-height: 350px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Light Theme
   ═══════════════════════════════════════════════════════════ */
[data-theme="light"] .notif-dropdown {
  background: #ffffff;
  border-color: #d1d9e6;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .notif-header {
  background: linear-gradient(180deg, #f5f7fb 0%, #ffffff 100%);
}

[data-theme="light"] .notif-heading-title {
  color: #1a1f36;
}

[data-theme="light"] .notif-heading-count {
  color: #5a6380;
}

[data-theme="light"] .notif-divider {
  background: #e1e6ef;
}

[data-theme="light"] .notif-item {
  background: #f8fafd;
  border-color: #e1e6ef;
}

[data-theme="light"] .notif-item:hover {
  background: #eef1f8;
  border-color: #d1d9e6;
}

[data-theme="light"] .notif-item.unread {
  background: linear-gradient(90deg, #eef1f8 0%, #f8fafd 100%);
}

[data-theme="light"] .notif-title {
  color: #1a1f36;
}

[data-theme="light"] .notif-message {
  color: #5a6380;
}

[data-theme="light"] .notif-time {
  color: #8a92a8;
}

[data-theme="light"] .notif-footer {
  background: linear-gradient(0deg, #f5f7fb 0%, #ffffff 100%);
}

[data-theme="light"] .notif-empty-title {
  color: #1a1f36;
}

[data-theme="light"] .notif-empty-text {
  color: #5a6380;
}