/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION SETTINGS MODAL
   Uses portal tokens: --bg-card, --text, --border, --state-active, --bg-input
   Reuses toggle-switch pattern from profile.css and modal pattern from meal-planning.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* Modal overlay */
.notif-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notif-modal.open {
  display: flex;
}

/* Modal content */
.notif-modal-content {
  background: var(--bg-card, #3a4556);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* Close button */
.notif-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light, #a0aec0);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.notif-modal-close:hover {
  color: var(--text, #EDE8D0);
}

/* Title & subtitle */
.notif-modal-title {
  font-size: 1.25rem;
  color: var(--text, #EDE8D0);
  margin: 0 0 4px 0;
}

.notif-modal-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted, #8a95a5);
  margin: 0 0 20px 0;
  line-height: 1.4;
}

/* Time pickers section */
.notif-time-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #4a5568);
}

.notif-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.notif-time-row label {
  font-size: 0.875rem;
  color: var(--text, #EDE8D0);
}

.notif-time-row input[type="time"] {
  background: var(--bg-input, #252d3a);
  border: 1px solid var(--border, #4a5568);
  border-radius: var(--radius-md, 8px);
  color: var(--text, #EDE8D0);
  padding: 6px 10px;
  font-size: 0.875rem;
  width: 120px;
}

/* Category groups */
.notif-category-group {
  margin-bottom: 16px;
}

.notif-category-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #8a95a5);
  margin: 0 0 8px 0;
  padding: 0 var(--space-md, 12px);
}

/* Toggle rows — reuse profile.css pattern inline for self-containment */
.notif-modal .toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md, 12px);
  border-bottom: 1px solid var(--border, #4a5568);
}

.notif-modal .toggle-row.last {
  border-bottom: none;
}

.notif-modal .toggle-info {
  flex: 1;
  padding-right: var(--space-md, 12px);
}

.notif-modal .toggle-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text, #EDE8D0);
  margin-bottom: 2px;
}

.notif-modal .toggle-description {
  font-size: 0.6875rem;
  color: var(--text-muted, #8a95a5);
}

.notif-modal .toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.notif-modal .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.notif-modal .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-input, #252d3a);
  border: 1px solid var(--border, #4a5568);
  border-radius: 28px;
  transition: all 0.3s;
}

.notif-modal .toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted, #8a95a5);
  border-radius: 50%;
  transition: all 0.3s;
}

.notif-modal .toggle-switch input:checked + .toggle-slider {
  background-color: var(--state-active, #4A6FA5);
  border-color: var(--state-active, #4A6FA5);
}

.notif-modal .toggle-switch input:checked + .toggle-slider::before {
  background-color: var(--brand-white, #fff);
  transform: translateX(20px);
}

/* Action buttons */
.notif-actions {
  margin-top: 20px;
}

.notif-actions .btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.notif-actions .btn-primary {
  background: var(--state-active, #4A6FA5);
  color: #fff;
  margin-bottom: 8px;
}

.notif-actions .btn-primary:hover {
  opacity: 0.9;
}

.notif-actions .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.notif-actions .btn-secondary {
  background: transparent;
  color: var(--text-muted, #8a95a5);
  border: 1px solid var(--border, #4a5568);
}

.notif-actions .btn-secondary:hover {
  color: var(--text, #EDE8D0);
  border-color: var(--text-light, #a0aec0);
}
