/* Notifications inbox — Vazirmatn + panel chrome */

.sale-club-notifications-page,
.sale-club-notifications-page *,
.sc-notify-page,
.sc-notify-page * {
  font-family: var(--sale-club-font-family, 'Vazirmatn', Tahoma, sans-serif) !important;
}

.sc-notify-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 16px 40px;
  direction: rtl;
  color: #1f2937;
}

.sc-notify-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
}

.sc-notify-unread-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid #fecaca;
}

.sc-notify-unread-pill[data-sc-unread-count="0"] {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.sc-notify-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.sc-notify-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.sc-notify-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sc-notify-btn-primary {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.22);
}

.sc-notify-btn-primary:hover:not(:disabled) {
  background: #b91c1c;
  color: #fff;
}

.sc-notify-btn-secondary {
  background: #fff;
  border-color: #e5e7eb;
  color: #374151;
}

.sc-notify-btn-secondary:hover:not(:disabled) {
  border-color: #fca5a5;
  color: #b91c1c;
}

.sc-notify-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.sc-notify-filter {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
}

.sc-notify-filter select,
.sc-notify-filter input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #111827;
  background: #f9fafb;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sc-notify-filter select:focus,
.sc-notify-filter input:focus {
  outline: none;
  border-color: #f87171;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.sc-notify-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-notify-empty {
  text-align: center;
  padding: 32px 16px;
  color: #6b7280;
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  font-weight: 500;
}

/* Cards: unread = darker, read = lighter — compact row layout */
.sc-notify-item {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  outline: none;
  border: 1px solid transparent;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease,
    transform 0.2s ease;
}

.sc-notify-item:hover,
.sc-notify-item:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.08);
}

.sc-notify-item.is-unread {
  background: #e8eaef;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.sc-notify-item.is-unread.sc-notify-level-danger,
.sc-notify-item.is-unread.sc-notify-level-warning {
  background: #e5e7eb;
  border-color: #fca5a5;
}

.sc-notify-item::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: #94a3b8;
}

.sc-notify-item.sc-notify-level-success::before { background: #16a34a; }
.sc-notify-item.sc-notify-level-warning::before { background: #d97706; }
.sc-notify-item.sc-notify-level-danger::before { background: #dc2626; }
.sc-notify-item.sc-notify-level-info::before { background: #2563eb; }

.sc-notify-item.is-unread .sc-notify-title {
  font-weight: 700;
  color: #111827;
}

.sc-notify-item.is-read {
  background: #ffffff;
  border-color: #e5e7eb;
  opacity: 0.92;
  box-shadow: none;
}

.sc-notify-item.is-read .sc-notify-title {
  font-weight: 600;
  color: #4b5563;
}

.sc-notify-item.is-just-read {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

.sc-notify-item.is-compact {
  margin-bottom: 4px;
  padding: 8px 10px;
}

.sc-notify-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.sc-notify-content {
  flex: 1;
  min-width: 0;
}

.sc-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.sc-notify-title {
  display: block;
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.sc-notify-body {
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 2px;
}

.sc-notify-link {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
}

.sc-notify-link:hover,
.sc-notify-link:focus {
  color: #1e40af;
  text-decoration: underline;
}

.sc-notify-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.sc-notify-status-chip {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.sc-notify-item.is-read .sc-notify-status-chip {
  background: #f3f4f6;
  color: #6b7280;
}

/* Header bell — size/alignment shared with .sc-header-menu-btn in sale-club-common.css */
.sc-header-notify {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 10050;
}

.sc-header-notify-bell {
  position: relative;
  color: #fff !important;
  text-decoration: none !important;
}

.sc-header-notify-bell.has-unread {
  background: rgba(255, 255, 255, 0.22) !important;
}

.sc-header-notify-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sc-header-notify-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: #fff;
  color: #111827;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  z-index: 10060;
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
}

.sc-header-notify-panel[hidden] {
  display: none !important;
}

.sc-header-notify.is-open .sc-header-notify-panel {
  display: block;
}

.sc-header-notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.sc-header-notify-panel-head strong {
  font-size: 0.95rem;
  color: #111827;
}

.sc-header-notify-panel-count {
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
}

.sc-header-notify-list {
  max-height: 340px;
  overflow-y: auto;
}

.sc-header-notify-empty {
  padding: 28px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.sc-header-notify-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  text-align: right;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.sc-header-notify-item:hover,
.sc-header-notify-item:focus {
  background: #fef2f2;
  outline: none;
}

.sc-header-notify-item.is-unread {
  background: #fff7ed;
}

.sc-header-notify-item.is-unread .sc-header-notify-item-title {
  font-weight: 800;
}

.sc-header-notify-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}

.sc-header-notify-item-body {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
}

.sc-header-notify-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  font-size: 11px;
  color: #9ca3af;
}

.sc-header-notify-item-status {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.sc-header-notify-item.is-read .sc-header-notify-item-status {
  background: #f3f4f6;
  color: #6b7280;
}

.sc-header-notify-footer {
  display: block;
  padding: 12px 14px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: #b91c1c !important;
  text-decoration: none !important;
  background: #fef2f2;
  border-top: 1px solid #fecaca;
}

.sc-header-notify-footer:hover,
.sc-header-notify-footer:focus {
  background: #fee2e2;
  color: #991b1b !important;
}

.sc-account-dropdown-list a .sc-account-notify-count {
  display: inline-flex;
  margin-right: 8px;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  justify-content: center;
}

.sale-club-notifications[data-sc-notifications-banner="1"] {
  max-width: 1400px;
  margin: 12px auto 0;
  padding: 0 16px;
}

.sale-club-notifications[data-sc-notifications-banner="1"] .sc-notify-item {
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .sc-notify-filters {
    grid-template-columns: 1fr;
  }

  .sc-notify-filter-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .sc-header-notify {
    position: static;
  }

  .sc-header-notify-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: min(70vh, 520px);
    border-radius: 16px 16px 12px 12px;
    z-index: 10080;
  }

  .sc-header-notify-list {
    max-height: min(52vh, 380px);
  }
}

@media (max-width: 560px) {
  .sc-notify-filters {
    grid-template-columns: 1fr;
  }

  .sc-notify-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sc-notify-btn {
    width: 100%;
  }

  .sc-notify-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sc-notify-status-chip {
    margin-top: 0;
    align-self: flex-start;
  }
}

.sc-push-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.sc-push-panel-text {
  flex: 1 1 220px;
}

.sc-push-panel-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: #111827;
}

.sc-push-panel-text p {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.5;
}

.sc-push-panel-text p[data-state="on"] {
  color: #166534;
}

.sc-push-panel-text p[data-state="denied"],
.sc-push-panel-text p[data-state="error"],
.sc-push-panel-text p[data-state="unsupported"] {
  color: #b91c1c;
}

.sc-push-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 560px) {
  .sc-push-panel-actions .sc-notify-btn {
    width: 100%;
  }
}
