:root {
  --bg: #060b16;
  --panel: #0b1426;
  --panel-2: #13213a;
  --line: rgba(226,238,250,.14);
  --txt: #e2eefa;
  --ivory: #ffffff;
  --ink: #1c1712;
  --muted: rgba(226,238,250,.55);
  --acc: #3cc3fc;
  --acc-soft: rgba(60, 195, 252, 0.18);
  --ok: #16a34a;
  --radius: 14px;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(900px 500px at 15% -5%, rgba(60, 195, 252, 0.22), transparent 60%),
              radial-gradient(700px 420px at 95% 10%, rgba(28, 62, 108, 0.28), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

/* La tarjeta (formulario y calendario) va en blanco con letras azules, pedido del cliente.
   Se redefinen las variables solo acá adentro: el resto de la página sigue con el tema oscuro. */
.card {
  --panel: #ffffff;
  --panel-2: #f2f6fc;
  --line: rgba(10, 61, 145, 0.18);
  --txt: #0a3d91;
  --ivory: #0a3d91;
  --muted: rgba(10, 61, 145, 0.62);
  --ink: #06204d;
  color: var(--txt);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.split { display: grid; grid-template-columns: 320px 1fr; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.intro { padding: 28px 28px 0; }
@media (max-width: 820px) { .intro { padding: 22px 18px 0; } }
.intro h1 {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  color: var(--ivory);
}

.intro .bajada { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 8px 0 0; max-width: 62ch; }
.intro .bajada:empty { display: none; }
#formTitulo:empty { display: none; }

/* ---------- Columna de info ---------- */
.info { padding: 30px 26px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); }
@media (max-width: 820px) { .info { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; } }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: .18em; font-size: .68rem; text-transform: uppercase; color: var(--acc); }
/* El logo de ESA ya viene en blanco: no se tiñe. */
.brand img { width: 36px; height: auto; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
h1 { font-family: var(--sans); font-size: 1.35rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; margin: 20px 0 10px; color: var(--ivory); }
.info p.sub { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.meta { display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.meta div { display: flex; gap: 10px; align-items: flex-start; }
.meta svg { flex: none; margin-top: 2px; opacity: 0.75; }

/* ---------- Botón de WhatsApp ---------- */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 54px; height: 54px;
  border-radius: 50%; background: #25d366; color: #0b0b0d; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); text-decoration: none;
  transition: transform 0.15s ease;
}
.wa:hover { transform: scale(1.06); }
.wa::after {
  content: "¿No podés agendar?"; position: absolute; right: 64px; white-space: nowrap;
  background: var(--panel); color: var(--txt); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 11px; font-size: 12.5px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease;
}
.wa:hover::after { opacity: 1; }
@media (max-width: 700px) { .wa { width: 50px; height: 50px; right: 14px; bottom: 14px; } .wa::after { display: none; } }

/* ---------- Urgencia ---------- */
.urg { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cupo-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.cupo-top b { color: var(--txt); font-size: 13px; }
.barra { height: 6px; border-radius: 999px; background: rgba(226,238,250,.12); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 999px; background: var(--acc); width: 0; transition: width 0.6s ease; }
.barra.alta i { background: #c4a05c; }
.viendo { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Panel derecho ---------- */
.pane { padding: 18px 28px 30px; min-height: 0; }
@media (max-width: 820px) { .pane { padding: 14px 18px 22px; min-height: 0; } }
.pane h2 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 16px; color: var(--ivory); }
.pane .lead { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.step { display: none; }
.step.on { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Calendario ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head strong { font-size: 15px; text-transform: capitalize; letter-spacing: -0.01em; }
.nav { display: flex; gap: 8px; }
.nav button {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--acc);
  background: var(--acc); color: var(--ink); cursor: pointer; padding: 0;
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(60, 195, 252, 0.28);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.nav button svg { display: block; width: 22px; height: 22px; }
/* Deshabilitado = no hay más meses para ese lado: se apaga del todo para que el que sí sirve
   resalte solo, en vez de dejar dos botones iguales y que la persona pruebe el equivocado. */
.nav button:disabled {
  background: transparent; border-color: var(--line); color: var(--muted);
  opacity: 0.45; cursor: default; box-shadow: none;
}
.nav button:not(:disabled):hover { background: var(--ivory); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(60, 195, 252, 0.4); }
.nav button:not(:disabled):active { transform: translateY(0); }

.booking { display: grid; grid-template-columns: 1fr 214px; gap: 26px; }
@media (max-width: 700px) { .booking { grid-template-columns: 1fr; gap: 20px; } }

.dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.dow span { text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  aspect-ratio: 1 / 1; border: 0; border-radius: 11px; background: transparent; color: #55555f;
  font-size: 14px; font-family: inherit; cursor: default; position: relative; display: flex;
  align-items: center; justify-content: center; padding: 0;
}
.day.free { background: var(--panel-2); color: var(--txt); cursor: pointer; font-weight: 600; border: 1px solid transparent; }
.day.free:hover { border-color: var(--acc); background: var(--acc-soft); }
.day.free::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); }
.day.sel { background: var(--acc); color: var(--ink); }
.day.sel::after { background: #fff; }
.day.today { outline: 1px dashed #3a3a44; outline-offset: -1px; }

/* ---------- Horarios ---------- */
.slots h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.slot-list { display: grid; gap: 7px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
@media (max-width: 700px) { .slot-list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); max-height: none; } }
.slot {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--txt); border-radius: 10px;
  padding: 11px 12px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.12s;
}
.slot:hover { border-color: var(--acc); color: var(--acc); }
.slot small { font-weight: 400; font-size: 11px; color: var(--muted); }
.empty { color: var(--muted); font-size: 13.5px; padding: 14px 0; }

/* ---------- Formulario ---------- */
.back { display: block; background: none; border: 0; color: var(--muted); font-family: inherit; font-size: 13.5px; cursor: pointer; padding: 0; margin-bottom: 14px; }
.back[hidden] { display: none; }
.back:hover { color: var(--txt); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--acc-soft); border: 1px solid rgba(60,195,252,0.45);
  color: var(--ivory); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 22px;
}
.field { margin-bottom: 18px; }
.field label.q { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 7px; }
.field .hint { color: var(--muted); font-size: 12.5px; margin: -3px 0 7px; }
input[type="text"], input[type="tel"], input[type="email"], textarea, select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
  color: var(--txt); font-family: inherit; font-size: 15px; padding: 12px 13px; outline: none;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.opts { display: grid; gap: 7px; }
@media (min-width: 560px) { .opts.dos { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 11px; padding: 11px 13px; cursor: pointer; font-size: 14.5px; transition: 0.12s;
}
.opt:hover { border-color: #3d3d48; }
.opt input { accent-color: var(--acc); width: 16px; height: 16px; flex: none; }
.opt.on { border-color: var(--acc); background: var(--acc-soft); }
.compromiso { border: 1px solid rgba(60,195,252,0.4); background: var(--acc-soft); border-radius: 13px; padding: 15px; margin: 22px 0; }
.compromiso label { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 13.5px; line-height: 1.5; }
.compromiso input { accent-color: var(--acc); width: 18px; height: 18px; flex: none; margin-top: 1px; }
.compromiso .t { font-weight: 700; display: block; margin-bottom: 4px; font-size: 14px; }

.btn {
  width: 100%; background: var(--ivory); color: var(--ink); border: 2px solid var(--acc); border-radius: 999px; padding: 14px 18px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--txt); font-weight: 600; }
.error { background: rgba(60,195,252,0.12); border: 1px solid rgba(60,195,252,0.4); color: var(--ivory); border-radius: 11px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.honey { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Confirmación ---------- */
.done { text-align: center; padding: 26px 6px; }
.check { width: 62px; height: 62px; border-radius: 50%; background: rgba(22,163,74,0.14); border: 1px solid rgba(22,163,74,0.45); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.done h2 { font-size: 23px; margin: 0 0 8px; }
.done .when { font-size: 17px; font-weight: 700; margin: 18px 0 4px; }
.done .who { color: var(--ivory); font-size: 16px; font-weight: 600; }
.done .msg { color: var(--muted); font-size: 14px; max-width: 420px; margin: 18px auto 24px; }
.acts { display: grid; gap: 9px; max-width: 340px; margin: 0 auto; }
.acts a, .acts button { display: block; text-decoration: none; text-align: center; }
.foot { text-align: center; color: #55555f; font-size: 12px; margin-top: 22px; }
.foot a { color: #7a7a86; }

/* ---------- Modo embed (?embed=1, ver index.html) ---------- */
/* Saca todo lo que no sea elegir día/horario o completar el form: aside de
   info/cupos, botón flotante de WhatsApp y el footer de la página. Así el
   iframe muestra el calendario directo, sin tener que scrollear adentro. */
html.pg-embed .info,
html.pg-embed .wa,
html.pg-embed .shell > .foot { display: none !important; }
html.pg-embed .card.split { grid-template-columns: 1fr; }
html.pg-embed .shell { padding: 12px 12px 18px; max-width: 720px; }
/* Embebida, el fondo lo pone la web de afuera: sin color ni brillo propio, solo la tarjeta. */
html.pg-embed, html.pg-embed body { background: transparent; min-height: 0; }
html.pg-embed body::before { display: none; }
html.pg-embed .card { box-shadow: none; }
html.pg-embed #volver { display: none; }
#volverForm { display: none; }
html.pg-embed #volverForm { display: block; }

/* ---------- Ajustes de la tarjeta blanca ---------- */
/* El logo viene en blanco: sobre la tarjeta blanca se tiñe de azul para que se vea. */
.card .brand img { filter: brightness(0) invert(17%) sepia(80%) saturate(2600%) hue-rotate(208deg) brightness(88%); }
.card .brand { color: var(--txt); }
/* Botón principal: azul lleno con letras blancas (el blanco sobre blanco no se vería). */
.card .btn { background: var(--txt); color: #fff; border-color: var(--txt); }
.card .btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }
.card .nav button:not(:disabled):hover { color: #fff; }
.card .slot:hover { color: var(--txt); }
.card .day { color: #a3b1c9; }
.card .day.free { color: var(--txt); }
.card .day.sel { color: var(--ink); }
.card .day.today { outline-color: rgba(10, 61, 145, 0.35); }
.card .opt:hover { border-color: rgba(10, 61, 145, 0.4); }
.card .opt.on, .card .day.free:hover { background: rgba(60, 195, 252, 0.16); }

/* ---------- Tarjeta oscura (cartel de la página de gracias) ---------- */
/* El cliente quiere la agenda en blanco pero el cartel de confirmación con el azul oscuro de
   ESA de siempre: se vuelven a poner los valores originales y se deshacen los ajustes de arriba. */
.card.oscura {
  --panel: #0b1426;
  --panel-2: #13213a;
  --line: rgba(226,238,250,.14);
  --txt: #e2eefa;
  --ivory: #ffffff;
  --muted: rgba(226,238,250,.55);
  --ink: #1c1712;
}
.card.oscura .brand img { filter: none; }
.card.oscura .brand { color: var(--acc); }
.card.oscura .btn { background: var(--ivory); color: var(--ink); border: 2px solid var(--acc); }
.card.oscura .btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }
