.saved-notifications-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  z-index: 1000;
  animation: fadeInBackdrop 0.18s ease-out;
}

.saved-notifications-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.25);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.22s ease-out;
}

.saved-notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.saved-notifications-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.saved-notifications-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.saved-notifications-close:hover {
  background: var(--surface-muted);
  color: var(--text-main);
}

.saved-notifications-body {
  overflow-y: auto;
  padding: 1rem 1.5rem 1.5rem;
}

.saved-notifications-status,
.saved-notifications-empty,
.saved-notifications-error {
  margin: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.saved-notifications-error {
  color: var(--error);
}

.saved-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.saved-notifications-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  background: var(--surface-muted, #fafaf9);
}

.saved-notifications-item-main {
  flex: 1;
  min-width: 0;
}

.saved-notifications-item-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.saved-notifications-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.saved-notifications-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--secondary-container, #dbe7ff);
  color: var(--on-secondary, #06204a);
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.saved-notifications-chip--pharmacy {
  background: var(--primary-container, #cfead0);
  color: var(--on-primary, #09310a);
}

.saved-notifications-address {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.saved-notifications-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  touch-action: manipulation;
}

.saved-notifications-remove:hover:not(:disabled) {
  border-color: var(--error);
  color: var(--error);
  background: rgba(185, 28, 28, 0.06);
}

.saved-notifications-remove:disabled {
  opacity: 0.55;
  cursor: progress;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Dark mode adaptations */
[data-theme="dark"] .saved-notifications-item {
  background: var(--surface-container);
  border-color: var(--border);
}

[data-theme="dark"] .saved-notifications-item-name {
  color: #b0d4b8;
}

[data-theme="dark"] .saved-notifications-chip {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

[data-theme="dark"] .saved-notifications-chip--pharmacy {
  background: rgba(142, 212, 160, 0.15);
  color: #8ed4a0;
}

[data-theme="dark"] .saved-notifications-address {
  color: #9ca3af;
}

[data-theme="dark"] .saved-notifications-remove {
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .saved-notifications-remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: #f87171;
}

@media (max-width: 540px) {
  .saved-notifications-backdrop {
    padding: 2vh 0.5rem;
  }

  .saved-notifications-modal {
    max-height: 95vh;
  }

  .saved-notifications-header {
    padding: 1rem 1.1rem;
  }

  .saved-notifications-body {
    padding: 0.85rem 1.1rem 1.25rem;
  }
}
