/*
 * Yalowi — formulario de cita y fechas de viaje (lo monta yalowi-booking.js)
 * Paleta de la portada nueva. Selectores con prefijo `body` porque nicepage.css pisa clases simples.
 */
:root {
  --yb-green-900: #123f36;
  --yb-green-700: #2d574d;
  --yb-green-500: #316659;
  --yb-cream: #fff8ea;
  --yb-mint: #eaf6f1;
  --yb-accent: #f1c50e;
  --yb-ink: #1a1a1a;
  --yb-muted: #4a5a55;
  --yb-line: #dfe7e3;
  --yb-error: #b3261e;
  --yb-radius: 16px;
  --yb-font-head: 'Roboto', 'Open Sans', system-ui, sans-serif;
  --yb-font-body: 'Open Sans', system-ui, sans-serif;
}

/* ---------- Página «Reserva tu cita»: explicación a la izquierda, formulario a la derecha ---------- */
body .yb-page {
  background:
    radial-gradient(1200px 420px at 0% 0%, rgba(49, 102, 89, 0.10), transparent 60%),
    var(--yb-cream);
  padding: clamp(40px, 6vw, 80px) 16px clamp(56px, 8vw, 104px);
}
body .yb-page-inner {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
}
body .yb-aside { position: sticky; top: 104px; color: var(--yb-ink); font-family: var(--yb-font-body); }
body .yb-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  color: var(--yb-green-500); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
body .yb-eyebrow::before { content: ''; width: 28px; height: 3px; border-radius: 3px; background: var(--yb-accent); }
body h1.yb-page-title {
  margin: 0 0 16px;
  font-family: var(--yb-font-head); font-size: clamp(2.1rem, 1.5rem + 2vw, 3rem); font-weight: 700; line-height: 1.08;
  color: var(--yb-green-900);
}
body .yb-page-lead { margin: 0 0 32px; color: var(--yb-muted); font-size: 1.08rem; line-height: 1.6; }

body .yb-howto { counter-reset: yb-step; display: grid; gap: 20px; margin: 0 0 32px; padding: 0; list-style: none; }
body .yb-howto li {
  counter-increment: yb-step;
  display: grid; grid-template-columns: 36px 1fr; column-gap: 14px;
}
body .yb-howto li::before {
  content: counter(yb-step);
  grid-row: span 2;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--yb-accent); color: var(--yb-green-900); font-weight: 700;
}
body .yb-howto strong { color: var(--yb-green-900); font-size: 1.02rem; line-height: 1.3; padding-top: 2px; }
body .yb-howto span { color: var(--yb-muted); font-size: 0.95rem; line-height: 1.5; }

body .yb-contact { padding-top: 24px; border-top: 1px solid var(--yb-line); }
body .yb-contact p { margin: 0 0 10px; color: var(--yb-green-900); font-weight: 700; }
body .yb-contact-link {
  display: block; width: fit-content; margin: 0 0 6px;
  color: var(--yb-green-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
body .yb-contact-link:hover { color: var(--yb-green-900); }

body [data-yalowi-booking] { width: 100%; max-width: 880px; margin: 0 auto; text-align: left; }
body .yb-main [data-yalowi-booking] { max-width: none; }
/* Sin cabecera propia, el primer paso no necesita separador */
body .yb-form > .yb-step:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

@media (max-width: 991px) {
  body .yb-page-inner { grid-template-columns: minmax(0, 1fr); }
  body .yb-aside { position: static; }
  body .yb-page-lead { margin-bottom: 24px; }
  body .yb-howto { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 0; }
  body .yb-howto li { grid-template-columns: 1fr; row-gap: 8px; }
  body .yb-howto li::before { grid-row: auto; }
  body .yb-contact { display: none; } /* el formulario ya ofrece WhatsApp junto al botón */
}

@media (max-width: 575px) {
  body .yb-howto { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  body .yb-howto li { grid-template-columns: 28px 1fr; column-gap: 12px; align-items: center; }
  body .yb-howto li::before { grid-row: auto; width: 28px; height: 28px; font-size: 0.85rem; }
  body .yb-howto span { display: none; } /* en móvil, solo los títulos: el formulario queda más arriba */
}

body .yb-form,
body .yb-done {
  background: #fff;
  border: 1px solid var(--yb-line);
  border-radius: var(--yb-radius);
  box-shadow: 0 1px 2px rgba(18, 63, 54, 0.06), 0 12px 32px -16px rgba(18, 63, 54, 0.3);
  padding: clamp(20px, 4vw, 40px);
  color: var(--yb-ink);
  font-family: var(--yb-font-body);
  font-size: 1rem;
  line-height: 1.5;
}

body .yb-head { margin-bottom: 8px; }
body h2.yb-title {
  margin: 0 0 8px;
  font-family: var(--yb-font-head);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--yb-green-900);
}
body .yb-intro { margin: 0; color: var(--yb-muted); font-size: 1.05rem; }

body .yb-step { margin: 28px 0 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--yb-line); min-width: 0; }
body .yb-legend {
  display: flex; align-items: center; gap: 12px;
  padding: 0; margin: 0 0 6px;
  font-family: var(--yb-font-head); font-size: 1.2rem; font-weight: 700; color: var(--yb-green-900);
}
body .yb-num {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--yb-green-900); color: #fff; font-size: 0.95rem;
}
body .yb-hint { margin: 0 0 14px; color: var(--yb-muted); font-size: 0.95rem; }

body .yb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
body .yb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .yb-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
body .yb-grid .yb-field { margin: 0; }
body .yb-label { font-size: 0.9rem; font-weight: 600; color: var(--yb-green-900); }

body .yb-input {
  width: 100%; min-height: 48px; box-sizing: border-box;
  padding: 10px 14px; margin: 0;
  border: 1.5px solid #c9d6d1; border-radius: 10px;
  background: #fff; color: var(--yb-ink);
  font: inherit; font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body textarea.yb-input { min-height: 96px; resize: vertical; }
body .yb-input:focus { outline: none; border-color: var(--yb-green-500); box-shadow: 0 0 0 3px rgba(49, 102, 89, 0.2); }
body .yb-input:disabled { background: #f3f5f4; color: var(--yb-muted); }

/* Horas de cita */
body .yb-slots { display: flex; flex-wrap: wrap; gap: 10px; min-height: 48px; }
body .yb-slot { position: relative; margin: 0; }
body .yb-slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
body .yb-slot span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 82px; min-height: 46px; padding: 0 16px;
  border: 1.5px solid #c9d6d1; border-radius: 999px;
  background: #fff; color: var(--yb-green-900); font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
body .yb-slot input:hover + span { border-color: var(--yb-green-500); }
body .yb-slot input:checked + span { background: var(--yb-green-900); border-color: var(--yb-green-900); color: #fff; }
body .yb-slot input:focus-visible + span { outline: 2px solid var(--yb-accent); outline-offset: 3px; }

body .yb-check { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 16px; cursor: pointer; font-size: 0.98rem; }
body .yb-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--yb-green-900); }
body .yb-check a { color: var(--yb-green-700); text-decoration: underline; }

body .yb-msg { margin: 8px 0 0; color: var(--yb-error); font-size: 0.95rem; font-weight: 600; }
body .yb-msg:empty { display: none; }
body .yb-msg--form { margin: 20px 0 0; }

body .yb-link {
  margin: 0; padding: 0; border: 0; background: none;
  color: var(--yb-green-700); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer;
}

/* Campo trampa antispam: fuera de la vista */
body .yb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

body .yb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
body .yb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px; margin: 0;
  border: 0; border-radius: 999px;
  background: var(--yb-accent); color: #111;
  font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer;
  transition: background-color 0.25s ease, translate 0.25s ease, box-shadow 0.25s ease;
}
body .yb-btn:hover:not(:disabled) { background: #ffd633; translate: 0 -2px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5); }
body .yb-btn:disabled { opacity: 0.55; cursor: not-allowed; }
body .yb-btn:focus-visible { outline: 2px solid var(--yb-green-900); outline-offset: 3px; }
body .yb-alt { color: var(--yb-muted); font-size: 0.95rem; }
body .yb-alt a { color: var(--yb-green-700); font-weight: 600; text-decoration: underline; }

/* Confirmación */
body .yb-done { text-align: center; outline: none; }
body .yb-done .yb-intro { max-width: 560px; margin: 0 auto 16px; }
body .yb-done-icon {
  display: inline-grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%;
  background: var(--yb-mint); color: var(--yb-green-900); font-size: 1.6rem; font-weight: 700;
}

@media (max-width: 767px) {
  body .yb-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
  body .yb-grid,
  body .yb-grid--3 { grid-template-columns: minmax(0, 1fr); }
  body .yb-slot span { min-width: 74px; }
  body .yb-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body .yb-btn, body .yb-input, body .yb-slot span { transition: none; }
  body .yb-btn:hover:not(:disabled) { translate: none; }
}
