/* ==========================================================================
   Nexira Agenda — reserva pública (/reservar/{negocio}), Día 16; un solo color desde el Día 30
   Sistema de Nexira (Plus Jakarta Sans, radios, espaciado, íconos SVG) con UN color del negocio
   (definido en _ui.php): --color-primario (fondo), --color-primario-texto (texto encima, blanco o negro),
   --color-primario-legible (el color como texto sobre blanco) y, derivados con color-mix(),
   --color-primario-suave, --color-primario-borde y --color-primario-hover. --brand* son alias.
   Los colores fijos que quedan son neutros o de estado (confirmada, cancelada, aviso).
   Mobile-first: todo funciona con una mano desde el celular.
   ========================================================================== */

:root {
    color-scheme: light;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --line: #e2e8f0;
    --line-2: #cbd5e1;
    --text: #0f172a;
    --soft: #334155;
    --muted: #64748b;
    --dim: #94a3b8;
    --ok: #047857;
    --ok-soft: #ecfdf5;
    --warn: #b45309;
    --warn-soft: #fffbeb;
    --danger: #b91c1c;
    --danger-soft: #fef2f2;
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-text); }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.rsv-icon { width: 20px; height: 20px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hidden { display: none !important; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(720px, 100% - 32px); }
.ticket-wrap { width: min(560px, 100% - 32px); margin-inline: auto; }
main { flex: 1; padding: 28px 0 48px; }

/* ---------- Cabecera con la marca del negocio ---------- */

.pub-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.pub-header__inner { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.pub-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--soft); flex-shrink: 0; }
.pub-back:hover { background: var(--surface-2); }
.pub-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
.pub-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 1.15rem; flex-shrink: 0; overflow: hidden; }
.pub-logo--image { background: var(--surface); border: 1px solid var(--line); }
.pub-logo img { width: 100%; height: 100%; object-fit: contain; }
.pub-brand__name { overflow: hidden; font-size: 1.05rem; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.pub-brand__sub { display: block; overflow: hidden; color: var(--muted); font-size: .8rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Pie: desarrollado por Nexira ---------- */

.pub-footer { padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; }
.pub-footer p + p { margin-top: 6px; }
.pub-footer a { color: var(--soft); font-weight: 700; text-decoration: none; }
.pub-footer a:hover { color: var(--text); text-decoration: underline; }
.pub-footer__nexira { display: inline-flex; align-items: center; gap: 6px; }
.pub-footer__nexira img { width: 16px; height: 16px; }

/* ---------- Títulos ---------- */

.pub-hero { margin-bottom: 24px; }
.pub-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.pub-eyebrow .rsv-icon { width: 16px; height: 16px; }
.pub-title { margin-top: 12px; font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.12; letter-spacing: -.025em; }
.pub-lead { margin-top: 8px; color: var(--muted); font-size: 1.02rem; max-width: 36rem; }
.pub-contact { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; color: var(--soft); font-size: .9rem; }
.pub-contact span, .pub-contact a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.pub-contact .rsv-icon { width: 17px; height: 17px; color: var(--brand-text); }

/* ---------- Lista de servicios ---------- */

.svc-list { display: grid; gap: 12px; }
.svc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.svc:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(15, 23, 42, .35); }
.svc-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--color-primario); color: var(--color-primario-texto); font-size: 1.3rem; flex-shrink: 0; }
.svc__name { display: block; font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.svc__desc { margin-top: 4px; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: .85rem; }
.svc__meta span { display: inline-flex; align-items: center; gap: 5px; }
.svc__meta .rsv-icon { width: 16px; height: 16px; }
.svc__side { display: grid; justify-items: end; gap: 8px; }
.svc__price { font-size: 1.12rem; font-weight: 800; }
.svc__price--text { color: var(--muted); font-size: .9rem; font-weight: 600; }
.svc__go { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .9rem; font-weight: 700; white-space: nowrap; }
.svc__go .rsv-icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.svc:hover .svc__go .rsv-icon { transform: translateX(3px); }

@media (max-width: 600px) {
    .svc { grid-template-columns: auto minmax(0, 1fr); }
    .svc__side { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; padding-top: 12px; border-top: 1px solid var(--line); }
    .svc__go { justify-self: end; }
}

/* ---------- Tarjetas y estados vacíos ---------- */

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.empty { padding: 48px 24px; text-align: center; }
.empty__icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); }
.empty__icon .rsv-icon { width: 28px; height: 28px; }
.empty h2 { font-size: 1.2rem; }
.empty p { margin-top: 6px; color: var(--muted); }

/* ---------- Reserva: pasos ---------- */

.bk { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .bk { grid-template-columns: 330px minmax(0, 1fr); } .bk-aside { position: sticky; top: 88px; } }

.bk-aside { padding: 20px; }
.bk-service { display: flex; gap: 14px; align-items: center; }
.bk-service h1 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
.bk-service__desc { margin-top: 14px; color: var(--muted); font-size: .92rem; }
.bk-summary { display: grid; gap: 2px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.bk-summary__title { margin-bottom: 6px; color: var(--dim); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bk-summary__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .92rem; }
.bk-summary__row .rsv-icon { width: 18px; height: 18px; color: var(--brand-text); }
.bk-summary__row span { color: var(--muted); }
.bk-summary__row strong { margin-left: auto; text-align: right; }
.bk-summary__row.is-empty strong { color: var(--dim); font-weight: 500; }

@media (max-width: 899px) {
    .bk-service__desc { display: none; }
    .bk-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .bk-summary__title { grid-column: 1 / -1; margin-bottom: 0; }
    .bk-summary__row { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: .82rem; }
    .bk-summary__row .rsv-icon { display: none; }
    .bk-summary__row strong { margin-left: 0; text-align: left; font-size: .88rem; }
}

.steps { display: flex; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--dim); font-size: .85rem; font-weight: 700; }
.steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: .75rem; flex-shrink: 0; }
.steps li.is-active { border-color: var(--brand); color: var(--text); }
.steps li.is-active b { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.steps li.is-done { color: var(--ok); }
.steps li.is-done b { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
@media (max-width: 520px) { .steps li span { display: none; } .steps li.is-active span { display: inline; } .steps li { justify-content: center; } }

.panel { padding: 20px; animation: rise .3s var(--ease); }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.panel__title { font-size: 1.12rem; letter-spacing: -.01em; }
.link-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--brand-text); font-size: .88rem; font-weight: 700; cursor: pointer; }
.link-btn:hover { background: var(--brand-soft); }
.link-btn .rsv-icon { width: 16px; height: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Profesionales (Día 32: tarjetas compactas con foto, 2 columnas en el celular) */
.staff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .staff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 359px) { .staff-grid { grid-template-columns: minmax(0, 1fr); } }
.staff { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.staff:hover { border-color: var(--brand); }
.staff[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.staff__photo { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: var(--color-primario-suave); color: var(--color-primario-legible); flex-shrink: 0; font-size: 1.15rem; font-weight: 800; }
.staff__photo img { width: 100%; height: 100%; object-fit: cover; }
.staff__photo .rsv-icon { width: 22px; height: 22px; }
.staff__text { display: grid; min-width: 0; }
.staff__name { overflow: hidden; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.staff__hint { color: var(--muted); font-size: .78rem; line-height: 1.3; }

/* Calendario + horarios */
.cal-wrap { display: grid; gap: 20px; }
@media (min-width: 700px) { .cal-wrap { grid-template-columns: minmax(0, 1fr) 250px; } }
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal__title { font-size: 1.02rem; font-weight: 700; text-transform: capitalize; }
.cal__btns { display: flex; gap: 6px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--soft); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn .rsv-icon { width: 18px; height: 18px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__wd { padding: 6px 0; color: var(--dim); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.cal__day { position: relative; aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--dim); font-size: .95rem; font-weight: 600; cursor: default; }
.cal__day.is-available { background: var(--brand-soft); color: var(--brand-text); cursor: pointer; }
.cal__day.is-available:hover { outline: 2px solid var(--brand); }
.cal__day.is-selected { background: var(--brand); color: var(--brand-ink); }
.cal__day.is-today::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cal__day.is-loading { background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.slots { padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.slots__date { font-weight: 700; }
.slots__hint { color: var(--muted); font-size: .85rem; }
.slots__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; max-height: 320px; overflow-y: auto; padding: 2px; }
@media (min-width: 700px) { .slots__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.slot { padding: 10px 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; font-size: .95rem; cursor: pointer; transition: border-color .15s, background .15s; }
.slot:hover { border-color: var(--brand); }
.slot[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.slots__empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 20px 8px; color: var(--muted); font-size: .9rem; text-align: center; }
.slots__empty .rsv-icon { width: 26px; height: 26px; color: var(--dim); }

/* Formulario */
.form { display: grid; gap: 14px; }
.form__row { display: grid; gap: 14px; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 700; }
.field label small { color: var(--dim); font-weight: 500; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-size: 1rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { min-height: 92px; resize: vertical; }
.form__legal { color: var(--muted); font-size: .82rem; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: .92rem; }
.alert .rsv-icon { width: 18px; height: 18px; margin-top: 2px; }
.alert ul { margin: 0; padding: 0; list-style: none; }
.alert--error { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.alert--warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #fde68a; }
.alert--ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #a7f3d0; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 2px solid transparent; border-radius: 999px; font-size: 1rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), filter .15s; }
.btn .rsv-icon { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover:not(:disabled) { background: var(--color-primario-hover); transform: translateY(-1px); }
.svc:hover .svc__go { background: var(--color-primario-hover); }
/* Portada del negocio (Día 30): franja arriba de la página de reservas; la portada completa llega el Día 31. */
.pub-cover { height: clamp(120px, 30vw, 240px); background: var(--color-primario-suave) center / cover no-repeat; border-bottom: 1px solid var(--line); }
.staff:hover, .slot:hover, .svc:hover { border-color: var(--color-primario-borde); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.actions { display: grid; gap: 10px; }
@media (min-width: 520px) { .actions--row { grid-template-columns: auto 1fr; } }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Comprobante y cancelación ---------- */

.ticket { overflow: hidden; }
.ticket__status { padding: 28px 22px 22px; text-align: center; border-bottom: 1px dashed var(--line-2); }
.ticket__badge { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%; background: var(--st-soft); color: var(--st); animation: pop .45s cubic-bezier(.175, .885, .32, 1.275); }
.ticket__badge .rsv-icon { width: 32px; height: 32px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket__title { font-size: 1.55rem; letter-spacing: -.02em; }
.ticket__sub { margin-top: 4px; color: var(--muted); }
.ticket__body { display: grid; gap: 10px; padding: 20px; }
.info { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.info__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--brand-text); flex-shrink: 0; overflow: hidden; }
.info__icon img { width: 100%; height: 100%; object-fit: cover; }
.info__icon .rsv-icon { width: 18px; height: 18px; }
.info small { display: block; color: var(--muted); font-size: .78rem; }
.info strong { display: block; line-height: 1.35; }
.ticket__actions { display: grid; gap: 10px; padding: 0 20px 20px; }
.ticket__note { padding: 14px 20px; background: var(--ok-soft); color: var(--ok); font-size: .9rem; text-align: center; }
.ticket__note--muted { background: var(--surface-2); color: var(--muted); }
.page-links { margin-top: 18px; text-align: center; }
.page-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.page-links .rsv-icon { width: 16px; height: 16px; }

/* Día 17: cambio de hora y WhatsApp en un clic */
.change { display: grid; gap: 8px; }
.change__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.change__row small { color: var(--muted); font-size: .8rem; }
.change__row s { color: var(--muted); text-align: right; }
.change__row--new { border: 2px solid var(--brand); background: var(--surface); }
.change__row--new strong { text-align: right; }
.btn--whatsapp { background: #0f7a41; border-color: #0f7a41; color: #fff; }
.btn--whatsapp:hover { background: #0b6334; border-color: #0b6334; color: #fff; }
.ticket__note--changed { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* Día 18: aviso del negocio demo */
.pub-demo { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; background: #07090d; color: #e2e8f0; font-size: .85rem; text-align: center; }
.pub-demo .rsv-icon { width: 16px; height: 16px; color: #5eead4; flex-shrink: 0; }
.pub-demo strong { color: #fff; }

/* Día 20: abono con Mercado Pago */
.deposit { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--brand); background: var(--brand-soft); color: var(--soft); font-size: .9rem; }
.deposit__head { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 1rem; }
.deposit__head .rsv-icon { width: 20px; height: 20px; color: var(--brand-text); flex-shrink: 0; }
.deposit p { margin: 0; }
.deposit__policy { color: var(--muted); font-size: .85rem; }
.ticket__pay { display: grid; gap: 10px; padding: 0 20px 20px; }
.ticket__pay form { display: grid; }
.btn--mp { background: #0a6fb3; border-color: #0a6fb3; color: #fff; }
.btn--mp:hover { background: #085a91; border-color: #085a91; color: #fff; }
.ticket__note--warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }

/* Atención online: elegir presencial u online y unirse a la videollamada */
.modality { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.modality legend { margin-bottom: 6px; padding: 0; font-size: .88rem; font-weight: 700; }
.modality__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.modality__option { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.modality__option:hover { border-color: var(--color-primario-borde); }
.modality__option input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.modality__option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.modality__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--color-primario-suave); color: var(--color-primario-legible); flex-shrink: 0; }
.modality__icon .rsv-icon { width: 20px; height: 20px; }
.modality__text { display: grid; gap: 2px; min-width: 0; }
.modality__text small { color: var(--dim); font-size: .8rem; overflow-wrap: anywhere; }
.modality__note { margin: 0; }
.meet { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--brand); background: var(--brand-soft); }
.meet__head { display: flex; align-items: center; gap: 10px; color: var(--text); }
.meet__head .rsv-icon { width: 22px; height: 22px; color: var(--brand-text); flex-shrink: 0; }
.meet p { margin: 0; color: var(--soft); font-size: .88rem; overflow-wrap: anywhere; }

/* ==========================================================================
   Página del negocio (Día 31): portada, servicios, sobre nosotros, ubicación y horarios, contacto.
   ========================================================================== */
main.lp { padding-top: 0; }
.lp-hero { position: relative; display: grid; align-items: end; min-height: clamp(260px, 52vw, 420px); padding: 40px 0 32px; background: linear-gradient(160deg, var(--color-primario-suave), var(--surface-2)); border-bottom: 1px solid var(--line); }
.lp-hero--photo { background-position: center; background-size: cover; background-repeat: no-repeat; color: #fff; }
.lp-hero--photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 9, 13, .15) 0%, rgba(7, 9, 13, .72) 100%); }
.lp-hero__inner { position: relative; display: grid; justify-items: start; gap: 10px; }
.lp-hero__logo { display: grid; place-items: center; width: 88px; height: 88px; overflow: hidden; border: 3px solid var(--surface); border-radius: 22px; background: var(--color-primario); color: var(--color-primario-texto); box-shadow: var(--shadow); font-size: 2.1rem; font-weight: 800; }
.lp-hero__logo img { width: 100%; height: 100%; object-fit: cover; }
.lp-hero__name { margin: 6px 0 0; font-size: clamp(1.9rem, 7vw, 3rem); line-height: 1.08; letter-spacing: -.03em; overflow-wrap: anywhere; }
.lp-hero__tagline { max-width: 36rem; margin: 0; font-size: clamp(1rem, 3.6vw, 1.2rem); color: var(--soft); overflow-wrap: anywhere; }
.lp-hero--photo .lp-hero__tagline { color: rgba(255, 255, 255, .9); }
.lp-hero__cta { margin-top: 10px; }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.lp-section { padding: 36px 0 4px; scroll-margin-top: 80px; }
.lp-section__title { margin: 0 0 8px; font-size: clamp(1.35rem, 4.5vw, 1.7rem); letter-spacing: -.02em; }
.lp-section__lead { margin: 0 0 18px; color: var(--muted); }
.lp-about { margin: 0 0 20px; color: var(--soft); font-size: 1.02rem; line-height: 1.7; overflow-wrap: anywhere; }
.lp-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.lp-member { display: grid; justify-items: center; gap: 6px; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.lp-member__photo { display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 50%; background: var(--color-primario-suave); color: var(--color-primario-legible); font-size: 1.6rem; font-weight: 800; }
.lp-member__photo img { width: 100%; height: 100%; object-fit: cover; }
.lp-member__name { font-weight: 700; overflow-wrap: anywhere; }
.lp-member__bio { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.lp-place { display: grid; gap: 16px; padding: 18px; }
.lp-place__address { display: flex; gap: 12px; align-items: flex-start; color: var(--text); text-decoration: none; }
.lp-place__address .rsv-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-primario-legible); }
.lp-place__address strong { display: block; overflow-wrap: anywhere; }
.lp-place__address small { color: var(--color-primario-legible); font-weight: 600; }
.lp-hours { display: grid; gap: 0; margin: 0; }
.lp-hours div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.lp-hours dt { font-weight: 600; }
.lp-hours dd { margin: 0; color: var(--soft); text-align: right; }
.lp-hours .is-closed dd { color: var(--dim); }
.lp-contact { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-contact__item { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.lp-contact__item:hover { border-color: var(--color-primario-borde); background: var(--color-primario-suave); }
.lp-contact__item .rsv-icon, .lp-contact__item .fab { width: 18px; height: 18px; color: var(--color-primario-legible); font-size: 1.05rem; flex-shrink: 0; }
.lp-fab { display: none; }
@media (max-width: 699px) {
    .lp-hero--photo::before { background: linear-gradient(180deg, rgba(7, 9, 13, .35) 0%, rgba(7, 9, 13, .82) 100%); }
    .lp ~ .pub-footer { padding-bottom: 96px; }
    .lp-fab { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); display: inline-flex; box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .45); }
}

/* ==========================================================================
   Flujo de reserva (Día 32): header más delgado, tira de 14 días, horas en «Mañana» y «Tarde»,
   «Primera hora disponible», aviso de WhatsApp y «Tu reserva» como barra fija en el celular.
   ========================================================================== */
body:has(.bk-main) .pub-header__inner { min-height: 56px; }
body:has(.bk-main) .pub-logo { width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; }
body:has(.bk-main) .pub-back { width: 36px; height: 36px; }
main.bk-main { padding-top: 18px; }
@media (min-width: 900px) { .bk-aside { top: 76px; } }

.steps li a { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; }
.steps li b .rsv-icon { width: 14px; height: 14px; }
.steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps li { min-width: 0; padding: 9px 10px; }
@media (max-width: 520px) { .steps li.is-done span { display: none; } .steps li.is-active span { display: inline; } }

.first-slot { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 14px; padding: 12px 14px; border: 2px dashed var(--color-primario-borde); border-radius: var(--radius-sm); background: var(--color-primario-suave); color: var(--text); font-size: .95rem; text-align: left; cursor: pointer; }
.first-slot:hover { border-style: solid; }
.first-slot .rsv-icon { width: 20px; height: 20px; color: var(--color-primario-legible); }
.first-slot strong { color: var(--color-primario-legible); }

.days { display: flex; gap: 8px; margin: 0 -20px; padding: 2px 20px 10px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.days__loading { display: flex; gap: 8px; }
.day { display: grid; justify-items: center; flex: 0 0 64px; gap: 1px; padding: 9px 4px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); line-height: 1.15; cursor: pointer; scroll-snap-align: start; transition: border-color .15s, background .15s; }
.day:hover { border-color: var(--color-primario-borde); }
.day[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.day__name { font-size: .74rem; font-weight: 700; text-transform: capitalize; opacity: .8; }
.day__num { font-size: 1.3rem; font-weight: 800; }
.day__month { font-size: .72rem; font-weight: 600; opacity: .75; }
.day--more { place-items: center; color: var(--color-primario-legible); font-size: .82rem; font-weight: 700; border-style: dashed; }
.day.is-loading { height: 72px; border-color: transparent; background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; cursor: default; }

#slots { margin-top: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
#slots:empty { display: none; }
.slots__group + .slots__group { margin-top: 14px; }
.slots__label { margin: 10px 0 8px; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
#slots .slots__list { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); max-height: none; margin-top: 0; overflow: visible; }

.wa-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 2px; color: var(--soft); font-size: .84rem; line-height: 1.45; }
.wa-note .rsv-icon { width: 17px; height: 17px; margin-top: 1px; color: #0f7a41; }

.bk-bar { display: none; }
@media (max-width: 899px) {
    .bk-aside { padding: 14px 16px; }
    .bk-aside .bk-summary { display: none; }
    .bk-service .svc-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1.05rem; }
    .bk-bar { position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; display: block; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 -10px 30px -18px rgba(15, 23, 42, .35); }
    .bk-bar.hidden { display: none !important; }
    .bk-bar__inner { display: grid; gap: 1px; }
    .bk-bar__label { color: var(--dim); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
    .bk-bar__text { overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
    body.has-bk-bar .pub-footer { padding-bottom: 90px; }
    .panel { padding: 16px; }
    .days { margin: 0 -16px; padding: 2px 16px 10px; }
}
.ticket__save { display: grid; justify-items: center; gap: 6px; }
.bk > * { min-width: 0; }
/* Celular angosto: el nombre del profesional hace salto de línea (no se corta) y el paso activo muestra su nombre completo. */
.staff__name { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
@media (max-width: 520px) {
    .staff { gap: 8px; padding: 9px; }
    .staff__photo { width: 40px; height: 40px; font-size: 1rem; }
    .steps { gap: 5px; }
    .steps li { flex: 0 0 auto; justify-content: center; padding: 8px 10px; }
    .steps li.is-active { flex: 1 1 auto; }
    .steps li.is-active span { overflow: visible; }
}
.staff__name { overflow-wrap: break-word; }
.staff[data-staff-id="any"] { grid-column: 1 / -1; }
.days { scroll-padding-inline: 20px; }
@media (max-width: 899px) { .days { scroll-padding-inline: 16px; } }
/* Día 34: link al panel de demo en la franja */
.pub-demo { flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }
.pub-demo a { color: #5eead4; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pub-demo a:hover { text-decoration: underline; }
/* Agenda Salud (Fase 2): pago por transferencia directa al negocio (comprobante). */
.transfer__notice { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid #fcd34d; color: var(--text); line-height: 1.5; }
.transfer__bank { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.transfer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.transfer__bank dl { margin: 0; }
.transfer__row { display: grid; gap: 2px; padding: 8px 12px 8px 16px; border-top: 1px solid var(--line); }
.transfer__row:first-child { border-top: 0; }
.transfer__row dt { color: var(--muted); font-size: .8rem; }
.transfer__row dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; min-width: 0; font-weight: 700; }
.transfer__row dd span { min-width: 0; overflow-wrap: anywhere; }
.transfer__copy { flex-shrink: 0; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--brand-text); font-size: .82rem; font-weight: 700; cursor: pointer; }
.transfer__copy:hover { border-color: var(--color-primario-borde); background: var(--brand-soft); }
.transfer__copy:focus-visible, .transfer__file input:focus-visible { outline: 3px solid var(--color-primario-borde); outline-offset: 2px; }
.transfer__timer { color: var(--soft); font-size: .92rem; text-align: center; }
.transfer__form { gap: 12px; }
.transfer__file { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.transfer__file small { color: var(--muted); font-weight: 500; }
.transfer__file input { min-width: 0; max-width: 100%; padding: 10px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .85rem; }
.transfer__copied { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #0f172a; color: #fff; font-weight: 700; font-size: .9rem; z-index: 50; }
.transfer__copied[hidden] { display: none; }
/* Agenda Salud (Fase 5.2): usar una sesión de un pack en vez de pagar. */
.pack { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand-soft); font-weight: 700; cursor: pointer; }
.pack input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--brand); }
