/* ---------------------------------------------------------------------------
   Maquetas de pantalla.

   Recreaciones en HTML/CSS de pantallas reales de la app Locador. Los colores
   de marca salen de packages/tokens/src/palette.ts (locador, rebrand de
   septiembre 2026); el resto son grises neutros de la maqueta.

   Son ILUSTRACIONES: van con aria-hidden y cada una lleva su <figcaption>
   como texto real para lectores de pantalla. Por eso este archivo tiene una
   excepcion documentada al test que prohibe hex literal en el resto del
   sitio: una pantalla de telefono a tamano fijo no es UI real gobernada por
   el sistema de tokens, es un dibujo de esa UI.

   Los tonos de "pendiente" (ochre) NO cambiaron en el rebrand -son
   cross.ochre50/700 en palette.ts, identicos al valor viejo- asi que esos hex
   se portan sin tocar. Los tonos de marca (navy) si cambiaron y se
   actualizaron a la rampa nueva. El badge "falta" se corrige a la vez: el
   original (#78716C) era el bug de contraste documentado en CLAUDE.md hecho
   17, ya resuelto en la app real a stone-600 (#57534E); la maqueta tiene que
   mostrar la pantalla como es hoy, no como era antes del fix.

   Todo el interior usa px: son una representacion de una pantalla de telefono
   a tamano fijo, no tipografia del sitio que deba escalar con el usuario.
--------------------------------------------------------------------------- */

/* --- Carrusel de maquetas ------------------------------------------------
   El track sigue siendo un scroller horizontal, pero la barra nativa se
   apaga (mataba la interaccion visual). El movimiento va por flechas, por
   arrastre de mouse y por teclado; la logica esta en js/carrusel.js.
----------------------------------------------------------------------------- */

.carrusel {
  position: relative;
}

.phones {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  overflow-x: auto;
  padding-block: var(--space-2) var(--space-5);
  scroll-snap-type: x mandatory;
  /* Barra oculta: Firefox y el resto de los navegadores. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  scroll-behavior: smooth;
}

.phones::-webkit-scrollbar {
  display: none;
}

.phones:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* Durante el arrastre: sin snap peleando con el dedo, sin seleccion de texto. */
.phones.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.phones > * {
  /* `start`, no `center`: las figuras son casi tan anchas como el track, y
     con `center` los puntos de snap se vuelven inalcanzables y el scroll
     programatico rebota. Con `start` cada figura tiene su parada limpia. */
  scroll-snap-align: start;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .phones {
    scroll-behavior: auto;
  }
}

.carrusel__flecha {
  position: absolute;
  top: 300px;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition:
    opacity var(--duration-base) var(--ease-standard),
    background-color var(--duration-base) var(--ease-standard);
}

.carrusel__flecha:hover {
  background: var(--surface-alt);
}

.carrusel__flecha svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carrusel__flecha--prev {
  left: -8px;
}

.carrusel__flecha--next {
  right: -8px;
}

/* En los extremos, o si las cuatro maquetas entran sin scroll, la flecha se
   desvanece y deja de recibir eventos. carrusel.js pone el `disabled`. */
.carrusel__flecha[disabled] {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .carrusel__flecha {
    top: auto;
    bottom: calc(var(--space-5) + 40px);
  }
  .carrusel__flecha--prev {
    left: 0;
  }
  .carrusel__flecha--next {
    right: 0;
  }
}

.phone-figure {
  margin: 0;
  width: 300px;
  display: grid;
  gap: var(--space-4);
}

.phone-figure figcaption {
  font-size: var(--step--1);
  color: var(--text-muted);
  text-align: center;
  max-width: 300px;
}

.phone-figure figcaption b {
  display: block;
  color: var(--text);
  font-weight: 650;
}

.phone {
  width: 300px;
  height: 620px;
  border-radius: 42px;
  padding: 9px;
  background: linear-gradient(160deg, #2a4a75 0%, #0d2542 55%, #030b14 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgb(3 11 20 / 0.6);
}

.phone__screen {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #f1f5fa;
  display: flex;
  flex-direction: column;
  color: #070f1c;
  font-size: 13px;
  line-height: 1.35;
}

/* Barra de estado */
.ap-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 4px;
  font-size: 11px;
  font-weight: 650;
  color: #070f1c;
}

.ap-status i {
  display: inline-block;
  width: 14px;
  height: 8px;
  border: 1.2px solid #070f1c;
  border-radius: 2px;
  position: relative;
  font-style: normal;
}

.ap-status i::after {
  content: '';
  position: absolute;
  inset: 1.4px;
  right: 4px;
  background: #070f1c;
  border-radius: 1px;
}

.ap-body {
  flex: 1;
  overflow: hidden;
  padding: 6px 14px 10px;
}

.ap-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 6px 0 14px;
}

.ap-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 12px;
}

.ap-row-between .ap-title {
  margin: 0;
}

.ap-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0d2542;
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 650;
}

.ap-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b88a8;
  padding: 0 4px;
  margin-bottom: 6px;
}

/* Tarjetas */
.ap-card {
  background: #fff;
  border: 1px solid #c9d9ec;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ap-card--stat {
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
}

.ap-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e4ecf4;
  color: #1c5394;
  display: grid;
  place-items: center;
}

.ap-icon svg {
  width: 18px;
  height: 18px;
}

.ap-icon--lg {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.ap-icon--lg svg {
  width: 24px;
  height: 24px;
}

.ap-icon--ochre {
  background: #fdf2dc;
  color: #b07210;
}

.ap-grow {
  flex: 1;
  min-width: 0;
}

.ap-grow > span {
  display: block;
}

.ap-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
}

.ap-strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-sub {
  display: block;
  font-size: 11px;
  color: #6b88a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-chevron {
  flex: none;
  color: #91abca;
}

.ap-chevron svg {
  width: 16px;
  height: 16px;
}

/* Badges de estado — EstadoBadge.tsx */
.ap-badge {
  flex: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 550;
}

.ap-badge--pendiente {
  background: #fdf2dc;
  color: #7a5010;
}

.ap-badge--revisado {
  background: #e4ecf4;
  color: #1c5394;
}

.ap-badge--falta {
  background: #f5f5f4;
  color: #57534e;
}

/* Lista con switches — requisitos.tsx */
.ap-help {
  font-size: 11px;
  color: #6b88a8;
  padding: 0 4px;
  margin-bottom: 12px;
}

.ap-list {
  background: #fff;
  border: 1px solid #c9d9ec;
  border-radius: 12px;
  overflow: hidden;
}

.ap-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.ap-list-row:last-child {
  border-bottom: 0;
}

.ap-list-row svg {
  width: 16px;
  height: 16px;
  color: #6b7280;
  flex: none;
}

.ap-switch {
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
}

.ap-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e4ecf4;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

.ap-switch[data-on='true'] {
  background: #91abca;
}

.ap-switch[data-on='true']::after {
  left: 18px;
  background: #1c5394;
}

/* Detalle de comprobante */
.ap-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1c5394;
  margin: 6px 0 10px;
}

.ap-back svg {
  width: 15px;
  height: 15px;
}

.ap-doc {
  background: #fff;
  border: 1px solid #c9d9ec;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.ap-doc__preview {
  height: 190px;
  background:
    repeating-linear-gradient(
      180deg,
      #eef2f7 0 8px,
      #ffffff 8px 22px
    ),
    #fff;
  border-bottom: 1px solid #c9d9ec;
  display: grid;
  place-items: center;
  color: #91abca;
  position: relative;
}

.ap-doc__preview svg {
  width: 40px;
  height: 40px;
}

.ap-doc__preview span {
  position: absolute;
  bottom: 10px;
  font-size: 10px;
  color: #6b88a8;
}

.ap-doc__meta {
  margin: 0;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.ap-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.ap-meta-row dt {
  color: #6b88a8;
}

.ap-meta-row dd {
  margin: 0;
  font-weight: 600;
}

.ap-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1c5394;
  color: #fff;
  border-radius: 10px;
  padding: 11px;
  font-size: 13px;
  font-weight: 650;
}

.ap-btn svg {
  width: 16px;
  height: 16px;
}

/* Barra de pestanas */
.ap-tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 7px 4px 14px;
}

.ap-tab {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 550;
  color: #8e8e93;
  position: relative;
}

.ap-tab svg {
  width: 21px;
  height: 21px;
}

.ap-tab[data-active='true'] {
  color: #1c5394;
}

.ap-tab__badge {
  position: absolute;
  top: -3px;
  left: calc(50% + 5px);
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #c0400a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

/* Telefono del hero, un poco mas grande */
.phone--hero {
  width: 322px;
  height: 664px;
  border-radius: 46px;
}

.phone--hero .phone__screen {
  border-radius: 38px;
}

@media (max-width: 420px) {
  .phone--hero {
    width: 288px;
    height: 594px;
  }
}
