* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --error: #e53e3e;
  --text: #1a1a2e;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ─── PAGE WRAPPER ─────────────────────────────── */
.page-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── LEFT PANEL ────────────────────────────────── */
.left-panel {
  position: relative;
  width: 42%;
  flex-shrink: 0;
  overflow: hidden;
}

/* Slides */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Slide gradient backgrounds — replace background with background-image: url(...) for real photos */
.slide:nth-child(1) { background: linear-gradient(145deg, #0f0c29, #302b63, #24243e); }
.slide:nth-child(2) { background: linear-gradient(145deg, #134e4a, #0d9488, #06b6d4); }
.slide:nth-child(3) { background: linear-gradient(145deg, #7c2d12, #c2410c, #fbbf24); }
.slide:nth-child(4) { background: linear-gradient(145deg, #4c1d95, #7c3aed, #db2777); }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
}

.slide-body {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 32px;
  color: #fff;
  max-width: 380px;
}

.slide-icon {
  font-size: 3.2rem;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.slide-body h2 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.slide-body p {
  font-size: 1rem;
  line-height: 1.65;
  opacity: 0.9;
}

/* Dots */
.dots {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: #fff;
  transform: scale(1.35);
}

/* Progress bar at bottom of left panel */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.progress-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.4s ease;
}

/* ─── RIGHT PANEL ───────────────────────────────── */
.right-panel {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg);
  scroll-behavior: smooth;
}

/* Scrollbar styling */
.right-panel::-webkit-scrollbar { width: 6px; }
.right-panel::-webkit-scrollbar-track { background: #f1f5f9; }
.right-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ─── FORM CONTAINER ────────────────────────────── */
.form-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 44px 28px 60px;
}

.form-header {
  margin-bottom: 30px;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-subtitle {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.01em;
}

/* Section label */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin: 28px 0 18px;
}

/* Form rows */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}

.required {
  color: #e53e3e;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

.form-group input[type="file"] {
  padding: 8px 10px;
}

.age-card {
  margin: 18px 0 26px;
  padding: 18px 20px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 14px;
  background: #eef2ff;
  color: #1f2937;
}

.age-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.age-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.08);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.error {
  margin-top: 4px;
  font-size: 0.79rem;
  color: var(--error);
  min-height: 16px;
}

/* Checkbox */
.checkbox-group {
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label a {
  color: var(--accent);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}

.btn-submit:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-submit:active {
  transform: scale(0.99);
}

/* ─── EVENT DETAILS CARD (top) ────────────────── */
.event-details-card {
  display: flex;
  gap: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 28px;
}

.event-details-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.05rem;
}

.event-details-body {
  flex: 1;
  min-width: 0;
}

.event-details-body h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-details-body ul {
  margin: 0;
  padding-left: 18px;
  color: #1e40af;
  font-size: 0.86rem;
  line-height: 1.65;
}

.event-details-body li {
  margin-bottom: 4px;
}

.event-details-body li:last-child {
  margin-bottom: 0;
}

.event-tagline {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e3a8a;
  line-height: 1.5;
  font-style: italic;
}

.event-meta {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  color: #1e40af;
  font-size: 0.86rem;
  line-height: 1.65;
}

.event-meta li {
  margin-bottom: 5px;
  padding-left: 16px;
  position: relative;
}

.event-meta li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: #2563eb;
  font-weight: 700;
}

.event-meta strong {
  color: #1e3a8a;
}

.event-format {
  margin: 0 0 10px;
  color: #1e40af;
  font-size: 0.86rem;
  line-height: 1.6;
}

.event-format strong {
  color: #1e3a8a;
}

.event-note {
  margin: 0;
  padding: 9px 12px;
  background: rgba(245, 158, 11, 0.14);
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  color: #78350f;
  font-size: 0.83rem;
  line-height: 1.55;
}

.event-note strong {
  color: #92400e;
}

/* Payment card variant */
.payment-card {
  background: #fffbeb;
  border-color: #fde68a;
}

.payment-card .event-details-icon {
  background: #d97706;
}

.payment-card .event-details-body h3 {
  color: #92400e;
}

.payment-card .event-details-body ul {
  color: #78350f;
}

.payment-card .event-details-body strong {
  color: #92400e;
}

/* ─── PAYMENT SUMMARY TABLE ───────────────────── */
.payment-summary {
  margin-bottom: 6px;
}

.payment-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
}

.payment-table th,
.payment-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.payment-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.payment-table .amt {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.payment-table tbody tr:last-child td {
  border-bottom: 1px solid #e2e8f0;
}

.payment-table tfoot td {
  background: #eef2ff;
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  border-bottom: none;
}

.payment-row-offline td {
  color: #92400e;
  font-style: italic;
}

.relay-notice {
  margin-top: 14px;
  padding: 12px 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  color: #78350f;
  font-size: 0.85rem;
  line-height: 1.55;
}

.relay-notice strong {
  color: #92400e;
}

/* ─── EVENT SECTIONS ──────────────────────────── */
.events-section {
  margin-bottom: 26px;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.events-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.events-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-add-event {
  padding: 7px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-add-event:hover {
  background: var(--accent-dark);
}

.btn-add-event:active {
  transform: scale(0.97);
}

/* Info icon */
.info-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: help;
  position: relative;
  transition: background 0.2s, color 0.2s;
}

.info-icon:hover {
  background: var(--accent);
  color: #fff;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  right: -8px;
  background: #1f2937;
  color: #fff;
  padding: 9px 13px;
  border-radius: 6px;
  font-family: inherit;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  width: max-content;
  max-width: 240px;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(4px);
  z-index: 100;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.info-icon::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 4px;
  border: 6px solid transparent;
  border-top-color: #1f2937;
  margin-bottom: -2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  z-index: 101;
  pointer-events: none;
}

.info-icon:hover::after,
.info-icon:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.events-error {
  display: block;
  margin-top: 6px;
}

/* Event row */
.event-row {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fafbfc;
}

.event-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.event-row-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.btn-remove-event {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.btn-remove-event:hover {
  background: #fee2e2;
  color: #ef4444;
}

.event-row .form-group {
  margin-bottom: 10px;
}

.event-row .form-group:last-child {
  margin-bottom: 0;
}

.event-row label {
  font-size: 0.82rem;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.time-row select {
  padding: 8px 28px 8px 10px;
  font-size: 0.88rem;
}

/* Success message */
.success-msg {
  text-align: center;
  margin-top: 18px;
  color: #15803d;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
  display: none;
}

.success-msg.show {
  display: block;
}

.error-msg {
  text-align: center;
  margin-top: 14px;
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 16px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── PAYMENT PROCESSING OVERLAY ──────────────── */
.payment-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.payment-overlay[hidden] {
  display: none;
}

.payment-overlay-card {
  background: #fff;
  padding: 36px 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.payment-overlay-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid #e2e8f0;
  border-top-color: #4f46e5;
  border-radius: 50%;
  margin: 0 auto 22px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.payment-overlay h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #1f2937;
  font-weight: 700;
}

.payment-overlay p {
  margin: 0 0 6px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}

.payment-overlay-warning {
  margin-top: 16px !important;
  color: #b91c1c !important;
  font-weight: 600;
  font-size: 0.84rem !important;
}

/* ─── COMPLETION SCREEN ───────────────────────── */
.completion-screen {
  text-align: center;
  padding: 60px 24px;
}

.completion-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  margin: 0 auto 22px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.completion-screen h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 14px;
}

.completion-screen p {
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 10px;
}

.completion-screen .payment-id {
  margin: 22px 0;
  font-size: 0.88rem;
  color: #6b7280;
}

.completion-screen code {
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #1f2937;
  font-size: 0.85rem;
}

/* ─── MOBILE RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .left-panel {
    width: 100%;
    height: 240px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
  }

  .slide-body {
    padding: 24px 20px;
  }

  .slide-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }

  .slide-body h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .slide-body p {
    font-size: 0.88rem;
    display: none;
  }

  .dots {
    bottom: 28px;
  }

  .right-panel {
    height: auto;
    overflow-y: visible;
  }

  .form-container {
    padding: 28px 18px 48px;
  }

  .form-header h2 {
    font-size: 1.45rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .events-header h3 {
    font-size: 0.85rem;
  }

  .info-icon::after {
    right: 0;
    max-width: 200px;
    font-size: 0.74rem;
  }

  .time-row select {
    font-size: 0.82rem;
    padding: 8px 22px 8px 8px;
  }

  .event-details-card {
    padding: 14px 14px;
    gap: 12px;
  }

  .event-details-body ul {
    font-size: 0.82rem;
  }

  .payment-table {
    font-size: 0.82rem;
  }

  .payment-table th,
  .payment-table td {
    padding: 9px 10px;
  }

  .payment-table tfoot td {
    font-size: 0.92rem;
  }
}

@media (max-width: 400px) {
  .left-panel {
    height: 200px;
  }

  .slide-body h2 {
    font-size: 1.15rem;
  }
}
