/* MUFAH Solutions · showroom de demos · piel del demo de RESERVAS Y CITAS
   Es la página de reservas del negocio ficticio, vista por su cliente final.
   Por eso usa la tipografía del sistema y el acento del perfil (--acento, lo pone
   el shell); el kit de MUFAH manda fuera del teléfono. Móvil primero: el
   calendario se diseñó para tocarse a 360 px sin errar el dedo. */

.rv {
  --rv-texto: #1A2330;
  --rv-secundario: #6A7380;
  --rv-fondo: #F6F7F9;
  --rv-panel: #FFFFFF;
  --rv-borde: #E3E6EB;
  --rv-ok: #2E7D5B;
  --rv-ok-fondo: #E4F1EA;
  --rv-pocos: #C08A2E;
  --rv-pocos-fondo: #FBF1DF;
  --rv-lleno: #B4443C;
  --rv-lleno-fondo: #FBEEED;
  --rv-radio: 12px;
  flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.4; color: var(--rv-texto); background: var(--rv-fondo);
  -webkit-font-smoothing: antialiased;
}
.rv button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.rv button:focus-visible { outline: 3px solid var(--acento, #2E6FD8); outline-offset: 2px; }

/* ── Barra de estado del sistema: no se usa; en un teléfono real ya existe ── */
.rv__sistema { display: none; }

/* ── Cabecera del negocio ── */
.rv__cab { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--rv-panel); border-bottom: 1px solid var(--rv-borde); flex: none; }
.rv__logo { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: var(--acento, #2E6FD8); color: var(--acento-texto, #fff); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.rv__logo svg, .rv__logo img { width: 100%; height: 100%; display: block; }
.rv__quien { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rv__quien strong { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv__quien span { font-size: 12.5px; color: var(--rv-secundario); }

/* ── Progreso ── */
.rv__pasos { list-style: none; margin: 0; padding: 10px 12px; display: flex; gap: 4px; background: var(--rv-panel); border-bottom: 1px solid var(--rv-borde); flex: none; }
.rv__paso { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--rv-secundario); padding: 4px 2px; border-radius: 8px; }
.rv__paso-num { width: 20px; height: 20px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--rv-borde); color: var(--rv-secundario); }
.rv__paso-texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv__paso--activo { color: var(--rv-texto); font-weight: 600; }
.rv__paso--activo .rv__paso-num { background: var(--acento, #2E6FD8); color: var(--acento-texto, #fff); }
.rv__paso--hecho { color: var(--rv-texto); cursor: pointer; }
.rv__paso--hecho .rv__paso-num { background: var(--rv-ok-fondo); color: var(--rv-ok); }
.rv__paso--hecho:hover { background: var(--rv-fondo); }
/* En pantallas angostas solo el paso activo lleva texto; los demás, su número */
@media (max-width: 419px) {
  .rv__paso { flex: 0 0 auto; }
  .rv__paso--activo { flex: 1; }
  .rv__paso:not(.rv__paso--activo) .rv__paso-texto { display: none; }
}

/* ── Cuerpo ── */
.rv__cuerpo { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 16px 16px 20px; }
.rv__titulo { margin: 0 0 12px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.rv__titulo--centro { text-align: center; }
.rv__subtitulo { margin: 16px 0 6px; font-size: 15px; font-weight: 700; }
.rv__texto { margin: 0 0 12px; color: var(--rv-secundario); font-size: 14px; }
.rv__texto--centro { text-align: center; }
.rv__pista { margin: 0 0 10px; font-size: 13px; color: var(--rv-secundario); }

/* ── Opciones: chips, lista y tarjetas ── */
.rv__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv__chip { display: flex; flex-direction: column; align-items: flex-start; min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--rv-borde); background: var(--rv-panel); color: var(--rv-texto); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.rv__chip small { font-weight: 400; font-size: 12px; color: var(--rv-secundario); }
.rv__chip--activo { border-color: var(--acento, #2E6FD8); background: var(--acento, #2E6FD8); color: var(--acento-texto, #fff); }
.rv__chip--activo small { color: inherit; opacity: .85; }

.rv__lista { display: flex; flex-direction: column; gap: 8px; }
.rv__tarjetas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rv__fila, .rv__tarjeta { position: relative; display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 10px; border-radius: var(--rv-radio); border: 1.5px solid var(--rv-borde); background: var(--rv-panel); color: var(--rv-texto); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rv__tarjeta { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 8px 10px; }
.rv__fila:hover, .rv__tarjeta:hover { border-color: #C9CED6; }
.rv__activo { border-color: var(--acento, #2E6FD8) !important; box-shadow: 0 0 0 2px var(--acento-claro, #E2EBFA); }
.rv__miniatura { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--acento-claro, #F0F2F5); display: flex; align-items: center; justify-content: center; }
.rv__tarjeta .rv__miniatura { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.rv__miniatura svg, .rv__miniatura img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv__miniatura--inicial { font-weight: 700; font-size: 18px; color: var(--acento-oscuro, #204E97); }
.rv__miniatura--cualquiera { font-size: 22px; color: var(--acento, #2E6FD8); }
.rv__opcion-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.rv__opcion-texto strong { font-size: 14.5px; font-weight: 700; }
.rv__opcion-texto span { font-size: 12.5px; color: var(--rv-secundario); }
.rv__opcion-texto b { font-size: 13px; font-weight: 600; margin-top: 2px; }
.rv__etiqueta { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--acento-claro, #F0F2F5); color: var(--acento-oscuro, #204E97); margin: 1px 0; }
.rv__marca { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rv-borde); position: relative; }
.rv__tarjeta .rv__marca { position: absolute; top: 12px; right: 12px; background: #fff; }
.rv__activo .rv__marca { border-color: var(--acento, #2E6FD8); background: var(--acento, #2E6FD8); }
.rv__activo .rv__marca::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid var(--acento-texto, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ── Calendario ── */
.rv__calendario { background: var(--rv-panel); border: 1px solid var(--rv-borde); border-radius: var(--rv-radio); padding: 10px 8px 8px; }
.rv__mes { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; padding: 0 2px; }
.rv__mes strong { font-size: 15px; font-weight: 700; }
.rv__mes-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--rv-fondo); color: var(--rv-texto); font-size: 22px; line-height: 1; cursor: pointer; }
.rv__mes-btn:disabled { opacity: .3; cursor: default; }
.rv__semana, .rv__dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.rv__semana span { text-align: center; font-size: 11px; font-weight: 600; color: var(--rv-secundario); padding: 2px 0 4px; }
.rv__dia { position: relative; aspect-ratio: 1; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--rv-texto); font-size: 14.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 0; }
.rv__dia--vacio { pointer-events: none; }
.rv__dia:not(:disabled):hover { background: var(--rv-fondo); }
.rv__dia--pasado, .rv__dia--cerrado { color: #B5BCC6; cursor: default; font-weight: 500; }
.rv__dia--cerrado .rv__dia-num { text-decoration: line-through; text-decoration-color: #C9CED6; }
.rv__dia--lleno { color: var(--rv-secundario); }
.rv__dia--hoy .rv__dia-num { box-shadow: inset 0 0 0 1.5px var(--acento, #2E6FD8); border-radius: 8px; padding: 1px 5px; }
.rv__dia--elegido { background: var(--acento, #2E6FD8) !important; color: var(--acento-texto, #fff); }
.rv__dia--elegido .rv__punto { background: currentColor !important; }
.rv__dia--elegido .rv__dia-num { box-shadow: none; }
.rv__punto { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rv-borde); }
.rv__punto--libre { background: var(--rv-ok); }
.rv__punto--pocos { background: var(--rv-pocos); }
.rv__punto--lleno { background: var(--rv-lleno); }
.rv__punto--cerrado { background: #C9CED6; }
.rv__leyenda { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; padding: 0 4px; font-size: 11.5px; color: var(--rv-secundario); }
.rv__leyenda span { display: inline-flex; align-items: center; gap: 5px; }

/* ── Horarios ── */
.rv__horarios { scroll-margin-top: 8px; }
.rv__bloques { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rv__bloque { position: relative; min-height: 46px; padding: 6px 4px; border-radius: 10px; border: 1.5px solid var(--rv-borde); background: var(--rv-panel); color: var(--rv-texto); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.rv__bloque:disabled { color: #B5BCC6; background: #F1F2F4; text-decoration: line-through; cursor: default; }
.rv__bloque:disabled .rv__badge { text-decoration: none; }
.rv__badge { font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.rv__badge--ultimo { background: var(--rv-pocos-fondo); color: var(--rv-pocos); }
.rv__badge--lleno { background: var(--rv-lleno-fondo); color: var(--rv-lleno); }
.rv__badge--gris { background: #EDEFF2; color: var(--rv-secundario); }
.rv__badge--ok { background: var(--rv-ok-fondo); color: var(--rv-ok); }
.rv__sesiones { display: flex; flex-direction: column; gap: 8px; }
.rv__sesion { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 54px; padding: 8px 12px; border-radius: var(--rv-radio); border: 1.5px solid var(--rv-borde); background: var(--rv-panel); color: var(--rv-texto); text-align: left; cursor: pointer; }
.rv__sesion:disabled { color: #B5BCC6; background: #F1F2F4; cursor: default; }
.rv__sesion-hora { display: flex; flex-direction: column; font-size: 15px; font-weight: 700; line-height: 1.2; }
.rv__sesion-hora small { font-size: 12px; font-weight: 400; color: var(--rv-secundario); }
.rv__sesion:disabled .rv__sesion-hora small { color: inherit; }
.rv__sesion .rv__badge { font-size: 11px; padding: 3px 8px; }

/* ── Resumen y formulario ── */
.rv__resumen { margin: 0 0 14px; padding: 12px 14px; background: var(--rv-panel); border: 1px solid var(--rv-borde); border-radius: var(--rv-radio); display: grid; gap: 6px; }
.rv__resumen div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.rv__resumen dt { color: var(--rv-secundario); flex: none; }
.rv__resumen dd { margin: 0; text-align: right; font-weight: 600; }
.rv__resumen--compacto { gap: 4px; padding: 10px 12px; }
.rv__form { display: grid; gap: 12px; }
.rv__campo { display: block; }
.rv__campo > span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--rv-secundario); }
.rv__campo > span i { font-style: normal; font-weight: 400; }
.rv__campo input, .rv__campo textarea { width: 100%; font-family: inherit; font-size: 16px; padding: 12px 13px; border: 1.5px solid var(--rv-borde); border-radius: 10px; background: var(--rv-panel); color: var(--rv-texto); transition: border-color .15s, box-shadow .15s; }
.rv__campo input:focus, .rv__campo textarea:focus { outline: 0; border-color: var(--acento, #2E6FD8); box-shadow: 0 0 0 3px var(--acento-claro, #E2EBFA); }
.rv__campo--error input, .rv__campo--error textarea { border-color: var(--rv-lleno); }
.rv__campo em { display: block; font-style: normal; font-size: 12.5px; color: var(--rv-lleno); margin-top: 5px; }

/* ── Éxito ── */
.rv__exito { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 6px; }
.rv__check { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%; background: var(--acento, #2E6FD8); color: var(--acento-texto, #fff); display: flex; align-items: center; justify-content: center; }
.rv__check svg { width: 36px; height: 36px; }
.rv__folio { margin: -6px 0 6px; text-align: center; font-size: 14px; color: var(--rv-secundario); }
.rv__folio strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; color: var(--rv-texto); letter-spacing: .04em; }
.rv__wa { background: #EFEAE2; border-radius: var(--rv-radio); padding: 10px 12px 12px; }
.rv__wa-cab { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3B4A54; margin-bottom: 8px; }
.rv__wa-cab svg { width: 22px; height: 22px; flex: none; }
.rv__wa-burbuja { position: relative; background: #FFFFFF; border-radius: 8px; border-top-left-radius: 0; padding: 8px 10px 16px; font-size: 13.5px; line-height: 1.4; color: #111B21; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.rv__wa-burbuja span { position: absolute; right: 8px; bottom: 4px; font-size: 11px; color: #53BDEB; }

/* ── Pie con acciones ── */
.rv__pie { flex: none; display: flex; gap: 10px; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0)); background: var(--rv-panel); border-top: 1px solid var(--rv-borde); }
.rv__btn { flex: 1; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 12px; background: var(--acento, #2E6FD8); color: var(--acento-texto, #fff); font-size: 16px; font-weight: 700; cursor: pointer; transition: opacity .15s, transform .1s; }
.rv__btn:active { transform: translateY(1px); }
.rv__btn:disabled { opacity: .4; cursor: default; }
.rv__btn--sec { flex: 0 0 auto; background: var(--rv-fondo); color: var(--rv-texto); padding: 12px 18px; }

@media (min-width: 768px) {
  .rv__cuerpo { padding: 18px 18px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv * { transition: none !important; }
}

/* ══════════════════════════════════════════════════════════
   DEMO ANCHO (≥ 700 px de pantalla) · la página de reservas del negocio en
   el navegador: banner del negocio y un formulario centrado.
   ══════════════════════════════════════════════════════════ */
@container pantalla (min-width: 700px) {
  .rv { background: var(--rv-fondo); }
  .rv__cab { padding: 18px 40px; gap: 14px; }
  .rv__logo { width: 52px; height: 52px; }
  .rv__quien strong { font-size: 20px; }
  .rv__quien span { font-size: 14px; }
  .rv__pasos { width: 100%; max-width: 820px; margin: 18px auto 0; padding: 12px 18px; border: 1px solid var(--rv-borde); border-bottom: 0; border-radius: var(--rv-radio) var(--rv-radio) 0 0; }
  .rv__paso { font-size: 13px; }
  .rv__cuerpo { width: 100%; max-width: 820px; margin: 0 auto; padding: 22px 28px 26px; background: var(--rv-panel); border: 1px solid var(--rv-borde); border-top: 0; border-bottom: 0; }
  .rv__pie { width: 100%; max-width: 820px; margin: 0 auto 18px; padding: 14px 28px 18px; background: var(--rv-panel); border: 1px solid var(--rv-borde); border-radius: 0 0 var(--rv-radio) var(--rv-radio); }
  .rv__btn { flex: 0 1 auto; min-width: 220px; margin-left: auto; cursor: pointer; }
  .rv__btn--sec { margin-left: 0; }
  .rv__tarjetas { grid-template-columns: repeat(3, 1fr); }
  .rv__bloques { grid-template-columns: repeat(5, 1fr); }
  .rv__dia { min-height: 50px; }
  .rv__chip, .rv__dia, .rv__bloque, .rv__sesion, .rv__tarjeta { cursor: pointer; }
  .rv__form { grid-template-columns: 1fr 1fr; }
  .rv__form > .rv__campo:has(textarea) { grid-column: 1 / -1; }
  .rv__exito { max-width: 560px; margin: 0 auto; }
}
