/* ============================================
   Fotobox Vermietung – Apple-inspiriertes Design
   ============================================ */

:root {
  /* Marken-Farben (CI) */
  --brand-primary: #00BF63;     /* Hauptgrün */
  --brand-secondary: #7ED957;   /* mittleres Grün */
  --brand-light: #C1FF72;       /* helles Grün */
  --brand-pale: #F0FFDC;        /* Hauch von Grün */

  /* Farben */
  --bg: #fafdf7;                /* sehr leichter Grünstich für Hintergrund */
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-muted: var(--brand-pale);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1a2e1f;              /* dunkles Grün-Anthrazit */
  --text-muted: #5a6a5f;
  --text-subtle: #8a958d;
  --accent: var(--brand-primary);
  --accent-hover: #00a857;
  --accent-bg: rgba(0, 191, 99, 0.10);
  --success: var(--brand-primary);
  --danger: #ff3b30;

  /* Radien */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 24px 60px rgba(0,0,0,0.10);

  /* Übergänge */
  --ease: cubic-bezier(0.4, 0.0, 0.2, 1);
  --t-fast: 180ms;
  --t-med: 280ms;
  --t-slow: 420ms;

  /* Layout */
  --container: 760px;
  --price-bar-h: 76px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

img { max-width: 100%; display: block; }

.app {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 20px calc(var(--price-bar-h) + 60px);
}

/* ============================================
   Header
   ============================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-mark { color: var(--text); }

.brand-name {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 17px;
}

.header-meta {
  font-size: 13px;
  color: var(--text-subtle);
}

/* ============================================
   Hero
   ============================================ */
.hero { text-align: center; margin: 16px 0 36px; }

.hero-title {
  font-size: clamp(32px, 5.4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 12px;
}

.hero-title .muted { color: var(--text-muted); font-weight: 600; }

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ============================================
   Progress
   ============================================ */
.progress {
  margin: 0 0 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 8px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.progress ol {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0 4px;
  min-width: max-content;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-subtle);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  padding: 2px 8px;
  transition: color var(--t-med) var(--ease);
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--t-med) var(--ease);
}

.step.active { color: var(--text); }
.step.active span {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.step.done span {
  background: var(--success);
  color: white;
}

.step.done span::before {
  content: '✓';
  font-size: 13px;
}

.step.done span { font-size: 0; }

/* ============================================
   Card
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .card { padding: 20px; }
  .app { padding: 16px 14px calc(var(--price-bar-h) + 40px); }
}

/* ============================================
   Step Panels
   ============================================ */
.step-panel {
  border: 0;
  margin: 0;
  padding: 0;
  display: none;
  animation: fadeSlide var(--t-slow) var(--ease);
}

.step-panel.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  padding: 0;
  display: block;
}

.step-desc {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ============================================
   Option Cards
   ============================================ */
.option-card {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.option-card[data-static="true"] {
  cursor: default;
  background: linear-gradient(180deg, var(--brand-pale) 0%, #ffffff 100%);
  border-color: rgba(0, 191, 99, 0.20);
}

.option-card.toggle-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.option-card.toggle-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card.toggle-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 0 0 1px var(--accent);
}

.option-card.toggle-card:has(input:checked) .check-indicator {
  background: var(--accent);
  border-color: var(--accent);
}

.option-card.toggle-card:has(input:checked) .check-indicator::after {
  opacity: 1;
  transform: scale(1) rotate(45deg);
}

.option-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.option-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.option-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.price-tag {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}

.check-indicator {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  transition: all var(--t-fast) var(--ease);
  display: none; /* die Indicator-Bubble braucht zu viel Platz – wir nutzen die Card-Farbe als Feedback */
}

.check-indicator::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: scale(0.6) rotate(45deg);
  transition: all var(--t-fast) var(--ease);
}

/* Feature-Liste */
.feature-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border: solid var(--accent);
  border-width: 0 0 1.8px 1.8px;
  transform: rotate(-45deg);
}

/* Gallery für Foto-Accessoires */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* ============================================
   Form Fields
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

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

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

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

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-line input { margin-top: 3px; accent-color: var(--accent); }

/* ============================================
   Service-Auswahl (Abholung vs Lieferung)
   ============================================ */
.service-options {
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
}

.service-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: flex-start;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.service-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.service-card.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 0 0 1px var(--accent);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all var(--t-fast) var(--ease);
}

.service-card.selected .service-icon {
  background: var(--accent);
  color: white;
}

.service-body { min-width: 0; }

.service-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.service-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.service-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.service-sub {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.service-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.service-meta li {
  font-size: 13px;
  color: var(--text-subtle);
  padding-left: 14px;
  position: relative;
}

.service-meta li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.radio-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
  margin-top: 8px;
  transition: all var(--t-fast) var(--ease);
}

.service-card.selected .radio-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.service-card.selected .radio-dot::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: white;
}

@media (max-width: 540px) {
  .service-card {
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 18px;
  }
  .radio-dot {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    align-self: center;
  }
  .service-icon { grid-column: 1; grid-row: 2; }
  .service-body { grid-column: 2; grid-row: 1 / span 2; }
}

/* ============================================
   Adress-Autocomplete
   ============================================ */
.delivery-details {
  margin-top: 14px;
  padding: 18px;
  background: var(--surface-muted);
  border-radius: var(--r-lg);
  animation: fadeSlide var(--t-med) var(--ease);
}

.address-field { position: relative; }

.autocomplete-wrap {
  position: relative;
}

.address-loader {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.suggestions {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
  animation: fadeSlide var(--t-fast) var(--ease);
}

.suggestions li {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: background var(--t-fast) var(--ease);
}

.suggestions li:hover,
.suggestions li.active {
  background: var(--surface-muted);
}

.suggestions li.no-result {
  color: var(--text-subtle);
  cursor: default;
  font-style: italic;
}

.suggestion-icon {
  flex-shrink: 0;
  color: var(--text-subtle);
  margin-top: 2px;
}

.suggestion-main { font-weight: 500; }
.suggestion-sub {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin-top: 1px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-subtle);
}

.distance-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  display: none;
}

.distance-result.show { display: block; animation: fadeSlide var(--t-med) var(--ease); }
.distance-result.success { background: rgba(0, 191, 99, 0.12); color: #00703a; }
.distance-result.error { background: rgba(255, 59, 48, 0.10); color: #a31509; }
.distance-result.loading { background: var(--accent-bg); color: var(--accent); }

.distance-result strong { font-weight: 600; }

/* ============================================
   Hint Boxes
   ============================================ */
.hint {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--surface-muted);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
}

.hint-placeholder {
  border-left-color: var(--text-subtle);
  border-left-style: dashed;
  background: rgba(0,0,0,0.02);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 11px 22px;
  border-radius: 980px; /* Apple pill */
  border: 0;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  background: var(--surface-muted);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) { background: #ececef; }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Summary Card
   ============================================ */
.summary-card {
  background: var(--surface-muted);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.summary-row:last-of-type { border-bottom: 0; }

.summary-row.total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1.5px solid var(--border-strong);
  border-bottom: 0;
  font-weight: 700;
  font-size: 18px;
}

.summary-label { color: var(--text-muted); }
.summary-row.total .summary-label { color: var(--text); }

.summary-meta {
  font-size: 13px;
  color: var(--text-subtle);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Sticky Preisleiste
   ============================================ */
.price-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  z-index: 50;
  transition: transform var(--t-med) var(--ease);
}

.price-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-bar-left { display: flex; flex-direction: column; }

.price-bar-label {
  font-size: 12px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-bar-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-bar-details {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 980px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: background var(--t-fast) var(--ease);
}

.price-bar-details:hover { background: var(--surface-muted); }

.price-bar-details svg {
  transition: transform var(--t-fast) var(--ease);
}

.price-bar-details[aria-expanded="true"] svg { transform: rotate(180deg); }

.price-bar-breakdown {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  animation: fadeSlide var(--t-med) var(--ease);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.breakdown-row.total {
  font-weight: 600;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 2px;
}

/* ============================================
   Success Modal
   ============================================ */
[hidden] { display: none !important; }

.success-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn var(--t-med) var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.success-content {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 420ms var(--ease);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-content h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.success-content p {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  text-align: center;
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-subtle);
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1410;
    --bg-elevated: #1a2520;
    --surface: #1a2520;
    --surface-muted: #243029;
    --border: rgba(255,255,255,0.10);
    --border-strong: rgba(255,255,255,0.18);
    --text: #f0f7f1;
    --text-muted: #a8b8ab;
    --text-subtle: #758075;
    --accent: var(--brand-secondary);     /* helleres Grün im Dark Mode für besseren Kontrast */
    --accent-hover: var(--brand-light);
    --accent-bg: rgba(126, 217, 87, 0.16);
  }

  .option-card[data-static="true"] {
    background: linear-gradient(180deg, #1f2a24 0%, #1a2520 100%);
  }

  .price-bar {
    background: rgba(26, 37, 32, 0.85);
  }

  .hint-placeholder {
    background: rgba(255,255,255,0.03);
  }
}
