/**
 * NEGO Foundation - Shared Common Stylesheet
 * Responsive Parallax, Slideshows, Modal Donation Dialog, Print Formatting & Security Controls
 */

:root {
  --plum: #42263a;
  --berry: #5d364f;
  --pink: #873c5b;
  --blush: #eadde5;
  --pale: #f6f3f5;
  --white: #ffffff;
  --ink: #2f2930;
  --muted: #5c535d;
  --line: #d8d1d8;
  --green: #1d7044;
  --amber: #b45309;
  --red: #9e1c38;
}

@media (prefers-contrast: more) {
  :focus-visible {
    outline: 4px solid currentColor !important;
    outline-offset: 3px;
  }

  a:not(.button) {
    text-decoration: underline;
    text-underline-offset: 0.15em;
  }

  button, input, textarea, select, .card, .panel {
    border: 2px solid currentColor;
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline: 2px solid Highlight !important;
    outline-offset: 3px;
  }

  button, input, textarea, select {
    border: 1px solid ButtonText;
  }
}

/* ─── PARALLAX & SLIDESHOW LAYERS ─── */
.px, [data-parallax] {
  --y: 0px;
  transform: translate3d(0, var(--y), 0);
  will-change: transform;
  transition: transform 0.08s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.slideshow-wrap, .bg-layer {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.slideshow-slide.active {
  opacity: 1;
}

.slide-fallback {
  background: linear-gradient(135deg, #42263a 0%, #5d364f 50%, #321d2d 100%) !important;
}

.scene.frame-capsule {
  border-radius: 150px;
}

.bg-scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(43, 19, 39, 0.45);
  backdrop-filter: blur(1px);
  z-index: 1;
}

/* ─── ACCESSIBLE DONATION MODAL ─── */
dialog.nego-modal {
  border: 0;
  border-radius: 24px;
  padding: 0;
  max-width: 660px;
  width: min(92vw, 660px);
  max-height: 90vh;
  box-shadow: 0 25px 60px rgba(43, 19, 39, 0.38);
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
}

dialog.nego-modal::backdrop {
  background: rgba(35, 12, 26, 0.72);
  backdrop-filter: blur(6px);
}

.nego-modal-box {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}

.nego-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.nego-modal-head h2 {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  color: var(--plum);
  margin: 4px 0 0;
}

.badge-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--plum);
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.close-btn {
  background: transparent;
  border: 0;
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
}
.close-btn:hover {
  background: var(--pale);
  color: var(--ink);
}

.stepper-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.stepper-dots .dot {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  font-size: 0.78rem;
  font-weight: bold;
  border-radius: 8px;
  background: var(--pale);
  color: var(--muted);
  border: 1px solid var(--line);
}

.stepper-dots .dot.active {
  background: var(--plum);
  color: white;
  border-color: var(--plum);
}

.stepper-dots .dot.completed {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.don-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0;
  margin-bottom: 20px;
}

.scope-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 10px 0 20px;
}

.scope-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}

.scope-card:hover, .scope-card:focus-visible {
  border-color: var(--pink);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(81, 33, 62, 0.1);
}

.scope-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.scope-card strong {
  color: var(--plum);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.scope-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.don-method-banner {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--plum);
  margin-bottom: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quick-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
}

.pick-btn {
  border: 1px solid var(--line);
  background: var(--pale);
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.pick-btn:hover {
  background: var(--blush);
  border-color: var(--pink);
}

.instruction-box {
  background: #fdfaf6;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-line;
  color: #78350f;
}

.instruction-box .highlight {
  font-weight: bold;
  color: #92400e;
  font-size: 1rem;
}

.security-warning {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.84rem;
  color: #9f1239;
  margin-bottom: 16px;
  line-height: 1.45;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ─── REVIEW CARD & RECEIPT CARD ─── */
.review-card, .receipt-card {
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.rev-row, .rec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
  font-size: 0.92rem;
}
.rev-row:last-child, .rec-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rev-row span, .rec-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.highlight-amt {
  color: var(--plum);
  font-size: 1.15rem;
  font-family: Georgia, serif;
}

.notice-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #1e40af;
  margin: 14px 0;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.confirmed {
  background: #dcfce7;
  color: #166534;
}

.receipt-success {
  text-align: center;
  margin-bottom: 16px;
}

.receipt-success .check-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.receipt-header {
  border-bottom: 2px solid var(--plum);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.receipt-header h4 {
  margin: 4px 0;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  color: var(--plum);
}

.receipt-header .brand-text {
  font-size: 0.82rem;
  color: var(--berry);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.receipt-header .rec-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.receipt-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── RESPONSIVE BEHAVIOR ─── */
@media (max-width: 600px) {
  .scope-cards, .form-row-2 {
    grid-template-columns: 1fr;
  }
  .nego-modal-box {
    padding: 18px;
  }
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions button {
    width: 100%;
  }
}

/* ─── REDUCED MOTION SUPPORT ─── */
@media (prefers-reduced-motion: reduce) {
  .px, [data-parallax] {
    transform: none !important;
    transition: none !important;
  }
  .slideshow-slide {
    transition: none !important;
  }
}

/* ─── PRINT VIEWS & PAGE BREAKS ─── */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 10pt;
  }
  header, footer, nav, .hero-buttons, .quick-actions, .modal-actions, .actions, .close-btn, #menuButton, .skip-link, [data-no-print] {
    display: none !important;
  }
  .wrap, main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  dialog.nego-modal {
    position: static;
    max-width: 100%;
    width: 100%;
    box-shadow: none;
    border: 0;
  }
  .receipt-card, .review-card, table {
    border: 1px solid #333 !important;
    page-break-inside: avoid;
  }
  table {
    width: 100%;
    border-collapse: collapse;
  }
  th, td {
    border: 1px solid #ddd;
    padding: 6pt;
  }
  th {
    background: #f0f0f0 !important;
    color: #000 !important;
  }
  thead {
    display: table-header-group;
  }
  tr {
    page-break-inside: avoid;
  }
  h1, h2, h3 {
    color: black !important;
    page-break-after: avoid;
  }
}
