/* ============================================================
   Estate Mediterranea – Pizzica Pizzica
   Public booking page styles
   ============================================================ */

/* ── Theme override: warm crimson palette (from the poster) ── */
:root {
  --seed:         #8B1A2C;
  --seed-light:   rgba(139,26,44,0.05);
  --seed-10:      rgba(139,26,44,0.10);
}

/* ── Body ── */
body {
  background: var(--scaffold-bg);
}

/* ── AppBar (absolute, transparent over hero) ── */
.appbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /*
   * Mobile: the image starts at 80px from the top
   * (space = (containerH - imageH) / 2 = (65.6vw+160px - 65.6vw) / 2 = 80px).
   * Setting height:80px + align-items:center centers logo & lang exactly
   * in that 80px gap, with uniform 16px horizontal padding.
   */
  height: 80px;
  padding: 0 16px;
  gap: 8px;
  z-index: 20;
  background: transparent;
  align-items: center;
}

@media (min-width: 768px) {
  .appbar {
    /* Same centered bar, slightly more padding on wider screens */
    padding: 0 24px;
  }
}

.appbar-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  flex: 1;
}

/* Logo visible everywhere, text always hidden */
.appbar-logo-mobile {
  height: 30px;
  border-radius: 7px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
  margin-right: auto;
  flex-shrink: 0;
}

.appbar-title {
  display: none;
}

.appbar-link {
  color: rgba(255,255,255,0.92);
}

.appbar-link:hover {
  background: rgba(255,255,255,0.18);
}

.lang-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lang-btn {
  display: inline-flex;
  cursor: pointer;
  border-radius: 999px;
  padding: 3px;
  transition: background .15s;
  text-decoration: none;
}

.lang-btn.active,
.lang-btn:hover {
  background: rgba(255,255,255,0.22);
}

.flag-circle {
  display: inline-flex;
  overflow: hidden;
  border-radius: 50%;
  width: 22px;
  height: 22px;
}

.flag-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Hero ── */
.hero {
  position: relative;
  /* Use individual properties so background-color is NOT reset by shorthand */
  background-image: url('../img/pizzica-hero.jpg');
  background-repeat: no-repeat;
  background-color: #1c0a0a;
  /* Mobile: full width, no horizontal crop, vertically centered */
  background-size: 100% auto;
  background-position: center center;
  min-height: 0;
  height: calc(65.6vw + 160px);
}

/* Desktop: cap hero height on very wide screens to avoid 1100px+ heroes */
@media (min-width: 960px) {
  .hero {
    /* Desktop: shorter hero, image shifted down to cut the sky/top */
    height: 420px;
    min-height: 0;
    max-height: 420px;
    background-size: 100% auto;
    background-position: center 55%;
  }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.40) 40%,
    rgba(0,0,0,0.75) 80%,
    rgba(0,0,0,0.88) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Match appbar horizontal padding on mobile */
  padding: 16px 16px 28px;
  color: #fff;
}

/* Hero content stays at bottom on all screen sizes */

/* ── Hero text – mobile first ── */
.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 4px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.65);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  color: #fff;
  font-weight: 500;
}

.hero-chip .material-icons-outlined {
  font-size: 13px;
  opacity: 0.85;
}

/* Desktop: scale text proportionally with viewport width */
@media (min-width: 768px) {
  .hero-content {
    padding: 20px 24px 44px;
  }
  .hero-title {
    /* 1.75rem at 768px → up to 3.2rem at 1280px */
    font-size: clamp(1.75rem, 4vw, 3.2rem);
    margin-bottom: 8px;
    line-height: 1.05;
  }
  .hero-subtitle {
    /* 0.9rem at 768px → up to 1.25rem at 1280px */
    font-size: clamp(0.9rem, 1.5vw, 1.25rem);
    margin-bottom: 16px;
  }
  .hero-chips      { gap: 8px; }
  .hero-chip       { padding: 6px 16px; font-size: clamp(11.5px, 1.1vw, 14px); gap: 6px; }
  .hero-chip .material-icons-outlined { font-size: clamp(13px, 1.2vw, 16px); }
}

/* ── Info bar ── */
.info-bar {
  background: #6B2D3A;
  color: #fff;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

/* Always two lines on all screen sizes */
.info-bar .info-main   { display: block; }
.info-bar .info-dimmed { display: block; opacity: 0.78; font-weight: 400; font-size: 12px; }

/* ── Page body ── */
.page-body {
  padding: 24px 16px 60px;
  display: flex;
  justify-content: center;
}

@media (min-width: 960px) {
  .page-body {
    padding: 48px 32px 80px;
  }
}

.page-container {
  width: 100%;
  max-width: 840px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Section headings ── */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.section-subheading {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ── Date cards grid ── */
.dates-grid {
  display: grid;
  /* Mobile: 3 colonne snelle; tablet+: auto-fill */
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .dates-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }
}

.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* min 44px touch target */
  padding: 12px 6px 10px;
  min-height: 80px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: center;
  user-select: none;
  font-family: inherit;
  /* No transform on mobile – feels jarring on touch */
}

/* Hover only on pointer devices */
@media (hover: hover) and (pointer: fine) {
  .date-card:hover {
    border-color: var(--seed);
    background: var(--seed-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,26,44,0.12);
  }
}

.date-card.selected {
  border-color: var(--seed);
  background: var(--seed-10);
  box-shadow: 0 0 0 3px rgba(139,26,44,0.15);
}

.date-card .dc-weekday {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--seed);
  margin-bottom: 4px;
}

.date-card .dc-day {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.date-card .dc-month {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: capitalize;
}

.date-card .dc-status {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--seed);
}

.date-card.sold-out {
  border-color: #c8b4b7;
  background: #f7f0f1;
  cursor: not-allowed;
  opacity: 0.85;
}

.date-card.sold-out .dc-day,
.date-card.sold-out .dc-month,
.date-card.sold-out .dc-weekday {
  color: #7b6165;
}

.date-card.sold-out .dc-status {
  color: #8b1a2c;
}

.dates-loader {
  padding: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.dates-empty {
  padding: 32px 20px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--border-color);
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── Form section (hidden until date selected) ── */
.form-section {
  display: none;
}

.form-section.visible {
  display: block;
}

.selected-date-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--seed-10);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--seed);
}

.selected-date-banner .material-icons-outlined {
  font-size: 20px;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  padding: 16px;
}

.form-card .section-subtitle {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 20px;
}

.fields-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.field-full {
  width: 100%;
}

.field-half {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  /* Ensure labels are readable on small screens */
  letter-spacing: 0.01em;
}

.required-star {
  color: var(--error);
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 13px 14px;
  /* 16px prevents iOS Safari from auto-zooming */
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  /* Remove inner shadow on iOS */
  -webkit-appearance: none;
  appearance: none;
}

.form-group input[type="number"] {
  -moz-appearance: textfield;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--seed);
  box-shadow: 0 0 0 2px var(--seed-10);
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 2px rgba(198,40,40,0.10);
}

.form-group .error-msg {
  font-size: 12px;
  color: var(--error);
  display: none;
}

.form-group.has-error .error-msg {
  display: block;
}

/* ── Price note ── */
/* ── Price note – row layout ── */
.price-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: #F4F6F3;
  border-radius: 10px;
  margin-top: 14px;
}

.price-note-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.price-note-row.price-note-main {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.price-note-row .material-icons-outlined {
  font-size: 18px;
  color: var(--seed);
  flex-shrink: 0;
}

/* ── Submit button ── */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  /* min 44px touch target */
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  background: var(--seed);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, opacity .15s;
  margin-top: 16px;
  /* Prevent double-tap zoom on iOS */
  touch-action: manipulation;
}

.btn-submit:hover:not(:disabled) {
  background: #5a1421;
}

.btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-submit .material-icons-outlined {
  font-size: 22px;
}

/* ── Form placeholder (no date selected) ── */
.form-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
}

.form-placeholder .material-icons-outlined {
  font-size: 40px;
  color: #d4d4d4;
}

.form-placeholder p {
  font-size: 14px;
  max-width: 380px;
  line-height: 1.5;
}

/* ── Success view ── */
.success-view {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 52px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
}

.success-view.visible {
  display: flex;
}

.success-icon {
  width: 72px;
  height: 72px;
  /* Warm tint consistent with crimson palette */
  background: rgba(139,26,44,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--seed);
}

.success-icon .material-icons-outlined {
  font-size: 36px;
}

.success-title {
  font-size: 24px;
  font-weight: 700;
}

.success-text {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.6;
}

.success-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--seed-10);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--seed);
}

.success-detail .material-icons-outlined {
  font-size: 18px;
}

.btn-another {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  background: none;
  border: 2px solid var(--seed);
  border-radius: var(--radius);
  color: var(--seed);
  cursor: pointer;
  transition: background .15s;
  touch-action: manipulation;
}

.btn-another:hover {
  background: var(--seed-10);
}

/* ── Snackbar ── */
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  min-width: 280px;
  max-width: 90vw;
  padding: 14px 22px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  text-align: center;
  transition: transform .3s ease;
  pointer-events: none;
}

.snackbar.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.snackbar.success { background: var(--seed); }
.snackbar.error   { background: var(--error); }

/* ═══════════════════════════════════════════════════════════
   Payment section
   ═══════════════════════════════════════════════════════════ */

/* Hidden until .visible added by JS */
.payment-section {
  display: none;
}

.payment-section.visible {
  display: block;
}

/* Order summary card */
.payment-card {
  padding: 20px 16px;
}

@media (min-width: 640px) {
  .payment-card { padding: 24px; }
}

.payment-summary {
  background: var(--seed-light);
  border: 1px solid var(--seed-10);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 20px;
}

.pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--seed-10);
}

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

.pay-row .material-icons-outlined {
  font-size: 18px;
  color: var(--seed);
  flex-shrink: 0;
}

.pay-row > span:nth-child(2) {
  flex: 1;
  color: var(--text-secondary);
}

.pay-total-row {
  padding-top: 14px;
}

.pay-total-row > span:nth-child(2) {
  color: var(--text-primary) !important;
  font-weight: 700;
}

.pay-total-row strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--seed);
}

/* ── SumUp info row ── */
.sumup-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #1b5e20;
}

.sumup-info-row .material-icons-outlined {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* SumUp pay button */
.btn-pay-sumup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--seed);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter .15s;
  margin-bottom: 16px;
  touch-action: manipulation;
}

.btn-pay-sumup:hover    { filter: brightness(1.08); }
.btn-pay-sumup:disabled {
  opacity: .55;
  cursor: not-allowed;
  filter: none;
}

.btn-pay-sumup .material-icons-outlined { font-size: 20px; }

/* Loading spinner inside pay button */
.pay-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Payment verification overlay */
.payment-verify-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 60px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  min-height: 240px;
}

.payment-verify-section p {
  font-size: 16px;
  color: var(--text-secondary);
}

.verify-spin {
  font-size: 48px !important;
  color: var(--seed);
  display: block;
  animation: spin-anim 1.2s linear infinite;
}

.spin-slow {
  display: inline-block;
  animation: spin-anim 1.5s linear infinite;
}

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

/* Back-to-form button */
.btn-back-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .15s, color .15s;
  touch-action: manipulation;
}

.btn-back-form:hover {
  background: var(--seed-10);
  color: var(--seed);
}


.btn-back-form .material-icons-outlined {
  font-size: 18px;
}

