/* ============================================================
   Lokale Schriften (kein externer Request, DSGVO-konform)
   ============================================================ */
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/PlayfairDisplay-VariableFont_wght.ttf')   format('truetype-variations');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf')   format('truetype-variations');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   Custom Properties & Theming
   ============================================================ */
:root {
  /* Light mode — warme Grautöne */
  --bg-primary:    #f4f3f0;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-input:      #edece8;
  --bg-overlay:    rgba(244,243,240,0.88);

  --text-primary:  #1a1918;
  --text-secondary:#44403c;
  --text-muted:    #78716c;

  --border:        #ddd9d4;
  --border-focus:  #525252;

  --accent-1:      #525252;   /* neutral-600 */
  --accent-2:      #404040;   /* neutral-700 */
  --accent-light:  rgba(82,82,82,.1);
  --accent-lighter:rgba(82,82,82,.05);

  --success:       #15803d;
  --success-bg:    #dcfce7;
  --error:         #b91c1c;
  --error-bg:      #fee2e2;
  --warning:       #b45309;
  --warning-bg:    #fef3c7;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.07);
  --shadow-md:     0 4px 16px rgba(0,0,0,.09);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.11);

  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-full:   9999px;

  --transition:    0.2s ease;
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-body:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  /* Dark mode — dunkle Steingrautöne */
  --bg-primary:    #181716;
  --bg-secondary:  #1f1e1d;
  --bg-card:       #242321;
  --bg-input:      #2a2927;
  --bg-overlay:    rgba(24,23,22,0.92);

  --text-primary:  #fafaf9;
  --text-secondary:#d6d3d1;
  --text-muted:    #78716c;

  --border:        #2d2b29;
  --border-focus:  #a8a29e;

  --accent-1:      #a8a29e;   /* stone-400 */
  --accent-2:      #d6d3d1;
  --accent-light:  rgba(168,162,158,.12);
  --accent-lighter:rgba(168,162,158,.06);

  --success:       #4ade80;
  --success-bg:    rgba(74,222,128,.12);
  --error:         #f87171;
  --error-bg:      rgba(248,113,113,.12);
  --warning:       #fbbf24;
  --warning-bg:    rgba(251,191,36,.12);

  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow-md:     0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.6);
}

/* High contrast mode */
@media (prefers-contrast: more) {
  :root {
    --border:       #000;
    --text-muted:   #333;
  }
  [data-theme="dark"] {
    --border:       #fff;
    --text-muted:   #ccc;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent-1);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: top var(--transition);
}
.skip-link:focus { top: 8px; }

/* Focus styles — accessible */
:focus-visible {
  outline: 3px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Layout
   ============================================================ */
.app-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--accent-1);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle */
.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 18px;
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: var(--accent-light);
}

/* ============================================================
   Hero / Intro
   ============================================================ */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-1);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* ============================================================
   Section Title
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   Event Cards
   ============================================================ */
.events-grid {
  display: grid;
  gap: 16px;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: block;
  text-decoration: none;
  color: inherit;
}

.event-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent-1);
}

.event-card:focus-visible {
  outline: 3px solid var(--accent-1);
  outline-offset: 2px;
}

.event-card-header {
  height: 6px;
  background: var(--event-color, #525252);
}

.event-card-body {
  padding: 20px 24px;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.meta-item svg, .meta-item .icon {
  flex-shrink: 0;
  opacity: .7;
}

.event-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.event-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.event-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.availability-bar {
  flex: 1;
  min-width: 160px;
}

.avail-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.avail-track {
  height: 5px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.avail-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.6s ease;
}

.avail-fill.warning { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.avail-fill.full    { background: #ef4444; }

.price-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-light);
  color: var(--accent-1);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Sold-out state */
.event-card.sold-out .event-card-header { background: #94a3b8 !important; }
.event-card.sold-out h3 { opacity: .6; }
.event-card.sold-out { cursor: default; }
.event-card.sold-out:hover { transform: none; box-shadow: var(--shadow-sm); }

.soldout-badge {
  display: inline-flex;
  align-items: center;
  background: var(--error-bg);
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.waitlist-badge {
  display: inline-flex;
  align-items: center;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Karte mit Warteliste (ausgebucht aber anmeldbar) */
.event-card.waitlist-only {
  opacity: .85;
}
.event-card.waitlist-only .event-card-header {
  background: repeating-linear-gradient(
    45deg,
    var(--event-color, #525252) 0px,
    var(--event-color, #525252) 4px,
    transparent 4px,
    transparent 10px
  );
}

/* ============================================================
   Gespeicherte Buchungen (manage.php)
   ============================================================ */
.stored-booking-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.stored-booking-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.stored-booking-info strong {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-primary);
}

.stored-booking-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   Modal / Drawer (Registration Form)
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(40px);
  transition: transform var(--transition);
}

@media (min-width: 640px) {
  .modal {
    border-radius: var(--radius-lg);
    transform: translateY(16px);
  }
}

.modal-backdrop.open .modal {
  transform: translateY(0);
}

/* Drag handle */
.modal-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}
.modal-handle-bar {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border);
}
@media (min-width: 640px) {
  .modal-handle { display: none; }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-event-info {
  flex: 1;
  min-width: 0;
}

.modal-event-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-event-date {
  font-size: 13px;
  color: var(--text-muted);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 18px;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}

/* ============================================================
   Form Styles
   ============================================================ */
.form-body {
  padding: 24px;
}

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

@media (max-width: 420px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-field label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-field input:not([type="checkbox"]),
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

/* Checkboxen — custom styling */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  display: inline-block;
  vertical-align: middle;
  position: relative;
  flex-shrink: 0;
}
input[type="checkbox"]:checked {
  background: var(--accent-1);
  border-color: var(--accent-1);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--accent-1);
  outline-offset: 2px;
  border-color: var(--accent-1);
}
input[type="checkbox"]:hover:not(:checked) {
  border-color: var(--accent-1);
  background: var(--accent-lighter);
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2378716c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

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

.form-field input:not([type="checkbox"]):focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: var(--bg-secondary);
}

.form-field input:not([type="checkbox"]).error,
.form-field select.error,
.form-field textarea.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(185,28,28,.1);
}

.field-error {
  color: var(--error);
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Google Maps + Event-URL Links in Karten */
.maps-link,
.event-url-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-1);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--accent-lighter);
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 4px;
}
.maps-link:hover,
.event-url-link:hover {
  background: var(--accent-light);
  border-color: var(--accent-1);
  text-decoration: none;
}
.ext-link-icon {
  flex-shrink: 0;
  opacity: .7;
  margin-left: 1px;
}

/* Checkbox-Label Wrapper */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   Progress Stepper
   ============================================================ */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 0;
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.step.completed:not(:last-child)::after,
.step.active:not(:last-child)::after {
  background: var(--accent-1);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.step.active .step-dot {
  border-color: var(--accent-1);
  background: var(--accent-light);
  color: var(--accent-1);
}

.step.completed .step-dot {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.step-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.step.active .step-label   { color: var(--accent-1); }
.step.completed .step-label { color: var(--success); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px; /* a11y touch target */
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-light);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: var(--accent-lighter);
}

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1.5px solid transparent;
}

.btn-danger:hover:not(:disabled) {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}

.btn-sm {
  font-size: 13px;
  padding: 8px 16px;
  min-height: 36px;
}

.btn-full { width: 100%; }

.btn-loading {
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* Form actions row */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-actions .btn { flex: 1; min-width: 120px; }

/* ============================================================
   Alert / Toast
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-success  { background: var(--success-bg); color: var(--success); }
.alert-error    { background: var(--error-bg);   color: var(--error); }
.alert-warning  { background: var(--warning-bg); color: var(--warning); }
.alert-info     { background: var(--accent-light); color: var(--accent-1); }

/* Toast notification */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: all;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--error); }

@keyframes toastIn {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes toastOut {
  to { transform: translateY(-16px); opacity: 0; pointer-events: none; }
}

/* ============================================================
   Success Screen
   ============================================================ */
.success-screen {
  text-align: center;
  padding: 40px 24px;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--success-bg);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.success-screen h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.success-screen p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
}

.booking-summary {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 0 auto 24px;
  text-align: left;
  max-width: 360px;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.booking-summary-row:last-child { border-bottom: none; }

.booking-summary-row .label { color: var(--text-muted); }
.booking-summary-row .value { font-weight: 600; color: var(--text-primary); text-align: right; }

/* ============================================================
   Manage Booking Page
   ============================================================ */
.manage-page {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 16px;
}

.booking-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.booking-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-lighter);
}

.booking-card-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.booking-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.booking-card-body { padding: 24px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 420px) {
  .info-grid { grid-template-columns: 1fr; }
}

.info-item { }
.info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.info-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.status-confirmed  { background: var(--success-bg);  color: var(--success); }
.status-cancelled  { background: var(--error-bg);    color: var(--error); }
.status-waitlisted { background: var(--warning-bg);  color: var(--warning); }

/* Manage link request */
.find-booking {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.find-booking h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 8px;
}

.find-booking p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ============================================================
   Loading skeleton
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--border) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 160px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3   { font-size: 18px; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p    { font-size: 14px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.site-footer a {
  color: var(--accent-1);
  text-decoration: none;
}

/* ============================================================
   WordPress iframe embed adjustments
   ============================================================ */
body.embedded {
  background: transparent;
}

body.embedded .site-header,
body.embedded .site-footer { display: none; }

body.embedded .hero { padding-top: 24px; }

/* ============================================================
   Responsive Utilities
   ============================================================ */
@media (min-width: 640px) {
  .events-grid {
    grid-template-columns: 1fr;
  }

  .form-actions .btn { flex: none; }
}

@media (max-width: 480px) {
  .event-card-body { padding: 16px 18px; }
  .hero { padding: 32px 0 24px; }
}
