/* Acné Faciales — página pública de reservas. Usa los tokens de base.css. Celular primero. */

body.reservar {
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 100% 0%, #FFE1E8 0%, rgba(255, 225, 232, 0) 60%),
    var(--fondo);
}

.saltar {
  position: absolute; left: 1rem; top: -100px; z-index: 10;
  background: var(--tinta); color: #fff; padding: .75rem 1rem; border-radius: var(--radio-sm);
  font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 1rem; }

/* ---------- Encabezado ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(1.75rem + env(safe-area-inset-top)) 1rem 4.5rem;
  background: linear-gradient(160deg, #FFF6F8 0%, #FFE6EC 55%, #FCD3DD 100%);
}
.hero-gotas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.hero-in { position: relative; max-width: 560px; margin: 0 auto; }
.marca { margin-bottom: 1rem; filter: drop-shadow(0 8px 18px rgba(217, 79, 112, .35)); }
.marca svg { width: 48px; height: 48px; }
.hero h1 {
  font-size: clamp(2rem, 8.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 0 0 .5rem;
  color: var(--tinta);
  text-wrap: balance;
}
.hero-frase { margin: 0; font-size: 1.125rem; font-weight: 500; color: #4B5160; max-width: 32ch; }

.contacto { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pastilla {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: .5rem .95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(217, 79, 112, .18);
  color: var(--tinta); font-weight: 600; font-size: .92rem; text-decoration: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pastilla:hover { background: #fff; }
.pastilla svg { width: 18px; height: 18px; flex: none; color: var(--rosa-600); }
.pastilla-dir span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }

/* ---------- Hoja principal ---------- */
.hoja {
  position: relative;
  max-width: 560px;
  margin: -2.75rem auto 0;
  padding: 1.25rem 1rem 2rem;
  background: var(--blanco);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(217, 79, 112, .08);
  min-height: 60vh;
  outline: none;
}
@media (min-width: 600px) {
  .hoja { border-radius: 28px; margin-bottom: 2rem; padding: 1.75rem 1.75rem 2rem; box-shadow: var(--sombra-alta); min-height: 0; }
}

.cargando { display: flex; justify-content: center; gap: .5rem; padding: 3rem 0; }
.cargando .punto { width: 10px; height: 10px; border-radius: 50%; background: var(--rosa); animation: latido 1s ease-in-out infinite; }
.cargando .punto:nth-child(2) { animation-delay: .15s; }
.cargando .punto:nth-child(3) { animation-delay: .3s; }
@keyframes latido { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.error-carga { display: grid; gap: 1rem; padding: 1rem 0; }

/* ---------- Progreso ---------- */
.progreso { margin: 0 0 1.5rem; }
.progreso ol {
  --avance: 0;
  position: relative;
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: space-between;
}
.progreso ol::before, .progreso ol::after {
  content: ""; position: absolute; top: 15px; left: 16px; height: 3px; border-radius: 3px;
}
.progreso ol::before { right: 16px; background: var(--borde); }
.progreso ol::after { width: calc((100% - 32px) * var(--avance)); background: var(--rosa); transition: width .35s ease; }
.progreso li { position: relative; z-index: 1; display: grid; justify-items: center; gap: .3rem; min-width: 0; flex: 0 1 auto; }
.bolita {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700;
  background: var(--blanco); color: var(--gris-claro); border: 2px solid var(--borde);
  transition: background-color .2s, border-color .2s, color .2s;
}
.bolita svg { width: 16px; height: 16px; }
.progreso li.hecho .bolita { background: var(--rosa); border-color: var(--rosa); color: #fff; }
.progreso li.actual .bolita { border-color: var(--rosa); color: var(--rosa-600); box-shadow: 0 0 0 5px var(--rosa-100); }
.etq { font-size: .72rem; font-weight: 600; color: var(--gris); white-space: nowrap; }
.progreso li.actual .etq { color: var(--tinta); }
@media (max-width: 380px) {
  .progreso li:not(.actual) .etq { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

/* ---------- Paso ---------- */
.paso-cabeza { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: 1.1rem; }
.paso h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; margin: 0; outline: none; padding-top: .45rem; }
.paso h2:focus-visible { outline: 3px solid var(--rosa); outline-offset: 4px; }
.paso-sub { margin: .2rem 0 0; color: var(--gris); font-size: .95rem; }
.atras {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--borde); background: var(--blanco); color: var(--tinta); cursor: pointer;
}
.atras:hover { background: var(--rosa-50); }
.atras svg { width: 22px; height: 22px; }
.atras[hidden] { display: none; }

/* ---------- Servicios ---------- */
.servicios { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.servicio {
  width: 100%; min-height: 84px;
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1rem 1rem 1rem;
  text-align: left; cursor: pointer;
  background: var(--blanco); color: var(--tinta);
  border: 1.5px solid var(--borde); border-radius: 20px;
  font: inherit;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.servicio:hover { border-color: #F2B3C3; box-shadow: 0 6px 18px rgba(217, 79, 112, .10); }
.servicio[aria-pressed="true"] { border-color: var(--rosa); background: var(--rosa-50); box-shadow: 0 0 0 3px var(--rosa-100); }
.servicio-icono {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #FFE1E8, #FFF1F4); color: var(--rosa-600);
}
.servicio-icono svg { width: 28px; height: 28px; }
.servicio-txt { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.servicio-nombre { font-weight: 700; font-size: 1.06rem; line-height: 1.25; }
.servicio-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: .9rem; color: var(--gris); }
.meta-dur { display: inline-flex; align-items: center; gap: .3rem; }
.meta-dur svg { width: 16px; height: 16px; }
.meta-precio { font-weight: 700; color: var(--rosa-600); }
.servicio-flecha { flex: none; color: var(--gris-claro); }
.servicio-flecha svg { width: 22px; height: 22px; }

/* ---------- Días ---------- */
.mes { margin: -.35rem 0 .6rem; font-weight: 700; color: var(--rosa-600); font-size: .95rem; min-height: 1.4em; }
.dias-marco { position: relative; margin: 0 -1rem; }
.dias {
  position: relative;
  display: flex; gap: .55rem;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 1rem;
  padding: .4rem 1rem .9rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dias::-webkit-scrollbar { display: none; }
.dia {
  flex: none; scroll-snap-align: start;
  width: 68px; min-height: 96px;
  display: grid; align-content: center; justify-items: center; gap: .1rem;
  border-radius: 22px;
  border: 1.5px solid var(--borde);
  background: var(--blanco); color: var(--tinta);
  font: inherit; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s, transform .15s;
}
.dia:hover:not([disabled]) { border-color: #F2B3C3; background: var(--rosa-50); }
.dia-sem { font-size: .78rem; font-weight: 600; color: var(--gris); }
.dia-num { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.dia-mes { font-size: .72rem; font-weight: 600; color: var(--gris); }
.dia[aria-pressed="true"] {
  background: linear-gradient(170deg, #E46685, var(--rosa-600));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 22px rgba(217, 79, 112, .35);
}
.dia[aria-pressed="true"] .dia-sem, .dia[aria-pressed="true"] .dia-mes { color: rgba(255, 255, 255, .9); }
.dia.cerrado { cursor: not-allowed; background: #F6F3F4; border-style: dashed; color: var(--gris-claro); }
.dia.cerrado .dia-sem, .dia.cerrado .dia-mes { color: var(--gris-claro); }
.dia.cerrado .dia-num { font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.dia.mes-nuevo:not(:first-child) { margin-left: .6rem; }

.dias-flecha {
  display: none;
  position: absolute; top: calc(50% - .25rem); transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  place-items: center;
  background: var(--blanco); border: 1px solid var(--borde); color: var(--tinta);
  box-shadow: var(--sombra); cursor: pointer;
}
.dias-flecha svg { width: 20px; height: 20px; }
.dias-flecha.izq { left: -8px; }
.dias-flecha.der { right: -8px; }
.dias-flecha[disabled] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .dias-flecha { display: grid; }
}
@media (min-width: 600px) {
  .dias-marco { margin: 0; }
  .dias { padding-left: .2rem; padding-right: .2rem; scroll-padding: 0; }
  .dias-flecha.izq { left: -20px; }
  .dias-flecha.der { right: -20px; }
}
.ayuda-dias { margin: .1rem 0 0; color: var(--gris); font-size: .85rem; }

/* ---------- Horas ---------- */
.horas-grupo + .horas-grupo { margin-top: 1.25rem; }
.horas-titulo { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-weight: 700; font-size: .95rem; color: var(--gris); }
.horas-titulo svg { width: 18px; height: 18px; color: var(--rosa); }
.horas-rejilla, .horas-cargando { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30%, 112px), 1fr)); gap: .6rem; }
.hora {
  min-height: 56px; padding: 0 .5rem;
  border-radius: 16px;
  border: 1.5px solid var(--borde); background: var(--blanco); color: var(--tinta);
  font: 700 1rem/1.1 var(--fuente); cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.hora:hover { border-color: var(--rosa); background: var(--rosa-50); color: var(--rosa-600); }
.hora[aria-pressed="true"] { background: var(--rosa); border-color: var(--rosa); color: #fff; }
.esqueleto {
  height: 56px; border-radius: 16px;
  background: linear-gradient(90deg, #F6EFF1 0%, #FDF7F9 50%, #F6EFF1 100%);
  background-size: 200% 100%;
  animation: brillo 1.2s linear infinite;
}
@keyframes brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.vacio { display: grid; justify-items: center; text-align: center; gap: .75rem; padding: 1.5rem 1rem; border-radius: 20px; background: var(--rosa-50); }
.vacio svg { width: 64px; height: 64px; }
.vacio-titulo { margin: 0; font-weight: 700; font-size: 1.05rem; max-width: 26ch; }
#aviso-hora { margin-bottom: 1rem; }

/* ---------- Datos ---------- */
.opcional { font-weight: 500; color: var(--gris); }
.error-campo { margin: 0; color: #B91C1C; font-size: .88rem; font-weight: 600; }
.input[aria-invalid="true"] { border-color: var(--mal); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--mal-50); }
#f-telefono { font-size: 1.15rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.trampa { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn-grande { min-height: 56px; font-size: 1.06rem; }

/* ---------- Resumen ---------- */
.resumen { margin-bottom: 1.25rem; border-radius: 22px; background: var(--fondo); border: 1px solid var(--borde); overflow: hidden; }
.resumen-fecha {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #FFF1F4, #FFE6EC);
}
.cal {
  flex: none; width: 64px; border-radius: 16px; overflow: hidden; text-align: center;
  background: var(--blanco); box-shadow: 0 6px 16px rgba(217, 79, 112, .18);
}
.cal-mes { display: block; background: var(--rosa); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem 0; }
.cal-dia { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; padding: .15rem 0 .3rem; }
.resumen-cuando { flex: 1; min-width: 0; }
.resumen-dia { margin: 0; font-weight: 700; }
.resumen-hora { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--rosa-600); letter-spacing: -.02em; }
.resumen-lista { margin: 0; padding: .25rem 1rem; }
.resumen-lista > div { display: flex; align-items: baseline; gap: .75rem; padding: .7rem 0; }
.resumen-lista > div + div { border-top: 1px solid var(--borde); }
.resumen-lista dt { flex: none; width: 6.5rem; color: var(--gris); font-size: .9rem; }
.resumen-lista dd { flex: 1; margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.tenue { color: var(--gris); font-weight: 500; }
.cambiar {
  flex: none; min-height: 44px; padding: 0 .75rem; margin: -.6rem -.5rem -.6rem 0;
  border: 0; background: none; border-radius: 999px;
  color: var(--rosa-600); font: 700 .9rem var(--fuente); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.cambiar:hover { background: var(--rosa-50); }
.resumen-fecha .cambiar { margin: 0; }
#aviso-confirmar { margin-bottom: 1rem; outline: none; }

.giro {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: giro .7s linear infinite;
}
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- Éxito ---------- */
.exito { text-align: center; padding-top: .5rem; }
.exito h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; outline: none; margin-top: 1rem; }
.exito-sub { margin: 0 auto 1.25rem; color: var(--gris); max-width: 34ch; }
.exito .resumen { text-align: left; }
.exito-acciones { display: grid; gap: .65rem; }
.check { width: 96px; height: 96px; margin: 0 auto; }
.check-fondo { fill: var(--ok-50); }
.check-aro { stroke: var(--ok); stroke-width: 4; stroke-dasharray: 277; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: center; }
.check-palomita { stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 0; }
.exito.animar .check-aro { animation: trazo-aro .6s cubic-bezier(.65, 0, .35, 1) both; }
.exito.animar .check-palomita { animation: trazo-palomita .35s .5s cubic-bezier(.65, 0, .35, 1) both; }
.exito.animar .check-fondo { animation: aparece .4s ease-out both; transform-origin: center; }
@keyframes trazo-aro { from { stroke-dashoffset: 277; } to { stroke-dashoffset: 0; } }
@keyframes trazo-palomita { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes aparece { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.btn-whatsapp { background: #E8F8EE; color: #136C34; border: 1px solid #BFE9CF; }
.btn-whatsapp:hover { background: #D5F2E0; }
.btn-whatsapp[hidden] { display: none; }

/* ---------- Pie ---------- */
.pie { text-align: center; padding: 1.5rem 1rem calc(2rem + env(safe-area-inset-bottom)); color: var(--gris); font-size: .85rem; }
.pie p { margin: 0; }
@media (max-width: 599px) {
  .pie { background: var(--blanco); }
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .esqueleto { background: #F6EFF1; }
  .cargando .punto { opacity: .6; }
  .giro { border-top-color: rgba(255, 255, 255, .45); }
}
