/**
 * Wayflo Tours – Souvenir-Video Styles
 */

/* ============================================================
   ENDSCREEN-BUTTON
============================================================ */
.wsv-trigger-wrap {
  display: flex;
  justify-content: center;
  margin: 1.4em 0 0.4em;
  opacity: 0;
  animation: wsv-stagger-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s forwards;
}
@keyframes wsv-stagger-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wsv-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg,
    var(--wayflo-primary, #2a7c6f) 0%,
    var(--wayflo-accent, #b8956a) 100%);
  color: #ffffff;
  border: none;
  font-family: var(--wayflo-font-body, 'Outfit', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.wsv-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

/* Test-Exit-Kreuz nur sichtbar mit ?wayflo_video_test=1 — fürs Desktop-Simulieren */
.wsv-test-exit {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #1a1815;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 300;
  padding: 0;
  padding-bottom: 4px;
}
.wsv-test-exit:hover {
  background: #ffffff;
  transform: scale(1.05);
}

/* ============================================================
   MODAL ROOT
============================================================ */
/* WICHTIG: hidden-Attribut MUSS display:flex überschreiben */
.wayflo-souvenir-modal[hidden] {
  display: none !important;
}
.wayflo-souvenir-modal {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: var(--wayflo-font-body, 'Outfit', system-ui, sans-serif);
}
body.wsv-modal-open {
  overflow: hidden;
}
.wsv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 12, 10, 0.7);
  backdrop-filter: blur(6px);
}
.wsv-content {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wsv-modal-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wsv-modal-in {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.wsv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #1a1815;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.wsv-inner {
  padding: 28px 24px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   HEADER
============================================================ */
.wsv-header {
  margin-bottom: 20px;
  text-align: center;
}
.wsv-title {
  font-family: var(--wayflo-font-display, 'Instrument Serif', serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: #1a1815;
  margin: 0 0 6px;
  line-height: 1.15;
}
.wsv-sub {
  font-size: 13.5px;
  color: #6b6357;
  line-height: 1.5;
  margin: 0;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   STOP LISTE
============================================================ */
.wsv-stops {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.wsv-stop {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px;
  background: #faf6ef;
  border-radius: 12px;
  border: 1px solid #f0ece2;
  transition: border-color 160ms ease;
}
.wsv-stop:hover {
  border-color: #e0d8c8;
}
.wsv-stop-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    var(--wayflo-primary, #2a7c6f) 0%,
    color-mix(in srgb, var(--wayflo-primary, #2a7c6f) 80%, black) 100%);
  background: #2a7c6f;  /* Fallback */
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.wsv-stop-meta {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.wsv-stop-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background-color: #e5e1d8;
  background-size: cover;
  background-position: center;
}
.wsv-stop-cover-empty {
  background-image: linear-gradient(135deg, #e5e1d8, #d8d0bf);
}
.wsv-stop-info { min-width: 0; }
.wsv-stop-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1815;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wsv-no-photos {
  font-size: 11.5px;
  color: #8a8170;
  font-style: italic;
}

.wsv-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wsv-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #e5e1d8;
  flex-shrink: 0;
}
.wsv-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a1815;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}

.wsv-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 2;
  padding-top: 4px;
}
.wsv-pick-btn {
  display: inline-flex;
  align-items: center;
  background: var(--wayflo-primary, #2a7c6f);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 200ms ease;
}
.wsv-pick-btn:hover { filter: brightness(0.95); }
.wsv-pick-btn input { display: none; }

/* ============================================================
   SMART-MATCH (Phase 3): EXIF-basierte Auto-Zuordnung
============================================================ */
.wsv-smart-wrap {
  margin-bottom: 22px;
}
.wsv-smart-btn {
  display: block;
  padding: 18px 20px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--wayflo-primary, #2a7c6f) 8%, white) 0%,
    color-mix(in srgb, var(--wayflo-accent, #b8956a) 6%, white) 100%);
  background: #f6f0e8; /* Fallback wenn color-mix nicht supportet */
  border: 1.5px dashed #d8cfb8;
  border-radius: 12px;
  cursor: pointer;
  transition: all 180ms ease;
  text-align: center;
}
.wsv-smart-btn:hover {
  border-color: var(--wayflo-primary, #2a7c6f);
  background: #faf6ef;
  transform: translateY(-1px);
}
.wsv-smart-btn input { display: none; }
.wsv-smart-title {
  display: block;
  font-family: var(--wayflo-font-display, 'Instrument Serif', serif);
  font-weight: 400;
  font-size: 18px;
  color: #1a1815;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.wsv-smart-sub {
  display: block;
  font-size: 12.5px;
  color: #6b6357;
  line-height: 1.5;
}

.wsv-or-divider {
  text-align: center;
  margin: 14px 0 4px;
  position: relative;
}
.wsv-or-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: #ece6dc;
}
.wsv-or-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 12px;
  font-size: 11.5px;
  color: #8a8170;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Smart-Match Analyzing-State */
.wsv-smart-analyzing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 20px;
  background: #faf6ef;
  border-radius: 12px;
  font-size: 13px;
  color: #6b6357;
  font-weight: 500;
}
.wsv-spinner-sm {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(42, 124, 111, 0.18);
  border-top-color: var(--wayflo-primary, #2a7c6f);
  border-radius: 50%;
  animation: wsv-spin 700ms linear infinite;
  flex-shrink: 0;
}

/* Smart-Match Status-Banner nach Auto-Match */
.wsv-smart-status {
  background: linear-gradient(90deg,
    rgba(42, 124, 111, 0.08),
    rgba(184, 149, 106, 0.06));
  background: rgba(42, 124, 111, 0.06);
  border-left: 3px solid var(--wayflo-primary, #2a7c6f);
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  color: #4a4036;
  margin-bottom: 16px;
  transition: opacity 400ms ease;
  line-height: 1.5;
}

/* ============================================================
   OPTIONS (Format + Duration)
============================================================ */
.wsv-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px;
  background: #faf6ef;
  border-radius: 12px;
}
@media (max-width: 480px) {
  .wsv-options { grid-template-columns: 1fr; }
}

/* Stil-Auswahl spannt sich über beide Spalten */
.wsv-option-group-wide {
  grid-column: 1 / -1;
}

/* 3D-Mode-Buttons sehen anders aus als Format/Dauer-Buttons */
.wsv-mode-buttons {
  gap: 8px;
}
.wsv-opt-mode {
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 14px;
  text-align: left;
}
.wsv-opt-mode-title {
  font-size: 13px;
  font-weight: 700;
}
.wsv-opt-mode-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
}
.wsv-option-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8170;
  margin-bottom: 8px;
}
.wsv-option-buttons {
  display: flex;
  gap: 6px;
}
.wsv-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1.5px solid #e5e1d8;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6b6357;
  cursor: pointer;
  transition: all 160ms ease;
}
.wsv-opt:hover {
  border-color: var(--wayflo-primary, #2a7c6f);
  color: var(--wayflo-primary, #2a7c6f);
}
.wsv-opt.is-active {
  border-color: var(--wayflo-primary, #2a7c6f);
  background: rgba(42, 124, 111, 0.08);
  color: var(--wayflo-primary, #2a7c6f);
}
.wsv-opt-icon {
  display: grid;
  place-items: center;
  height: 22px;
}
.wsv-frame {
  display: block;
  background: currentColor;
  opacity: 0.5;
  border-radius: 1.5px;
}
.wsv-frame-portrait  { width: 12px; height: 18px; }
.wsv-frame-square    { width: 16px; height: 16px; }
.wsv-frame-landscape { width: 22px; height: 12px; }
.wsv-opt.is-active .wsv-frame { opacity: 1; }

/* ============================================================
   ACTIONS
============================================================ */
.wsv-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #f0ece2;
}
.wsv-photo-count {
  font-size: 12.5px;
  color: #6b6357;
  font-weight: 500;
}
.wsv-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg,
    var(--wayflo-primary, #2a7c6f) 0%,
    var(--wayflo-accent, #b8956a) 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(42, 124, 111, 0.25);
  transition: all 200ms ease;
}
.wsv-create:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(42, 124, 111, 0.35);
}
.wsv-create:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================
   BUILDING SCREEN
============================================================ */
.wsv-building {
  text-align: center;
  padding: 32px 16px;
}
.wsv-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(42, 124, 111, 0.15);
  border-top-color: var(--wayflo-primary, #2a7c6f);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: wsv-spin 900ms linear infinite;
}
@keyframes wsv-spin { to { transform: rotate(360deg); } }
.wsv-building h3 {
  font-family: var(--wayflo-font-display, 'Instrument Serif', serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 8px;
  color: #1a1815;
}
.wsv-building p {
  color: #6b6357;
  font-size: 13px;
  margin: 0 0 24px;
  line-height: 1.5;
}
.wsv-progress {
  height: 6px;
  background: #f0ece2;
  border-radius: 999px;
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto 8px;
}
.wsv-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,
    var(--wayflo-primary, #2a7c6f),
    var(--wayflo-accent, #b8956a));
  width: 0%;
  transition: width 250ms ease;
}
.wsv-progress-text {
  font-size: 12px;
  color: #6b6357;
  font-variant-numeric: tabular-nums;
  margin-bottom: 24px;
}
.wsv-cancel {
  background: transparent;
  border: 1px solid #d8d2c4;
  color: #6b6357;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.wsv-cancel:hover { background: #faf6ef; }

/* ============================================================
   DONE SCREEN
============================================================ */
.wsv-done {
  text-align: center;
}
.wsv-done h3 {
  font-family: var(--wayflo-font-display, 'Instrument Serif', serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 16px;
  color: #1a1815;
}
.wsv-preview {
  width: 100%;
  max-height: 50vh;
  border-radius: 12px;
  background: #000;
  margin-bottom: 18px;
}
.wsv-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.wsv-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg,
    var(--wayflo-primary, #2a7c6f) 0%,
    var(--wayflo-accent, #b8956a) 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(42, 124, 111, 0.3);
  transition: transform 200ms ease;
}
.wsv-download:hover { transform: translateY(-1px); }
.wsv-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--wayflo-primary, #2a7c6f);
  border: 1.5px solid var(--wayflo-primary, #2a7c6f);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
}
.wsv-restart {
  background: transparent;
  border: 1px solid #d8d2c4;
  color: #6b6357;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.wsv-restart:hover { background: #faf6ef; }

/* ============================================================
   ERROR SCREEN
============================================================ */
.wsv-error {
  text-align: center;
  padding: 16px;
}
.wsv-error h3 {
  font-size: 20px;
  margin: 0 0 12px;
  color: #b54a4a;
}
.wsv-error p {
  color: #6b6357;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 22px;
}
