/* Contratá Ya — Estados (fila arriba de Buscar, visor y hoja). Usa /css/tokens.css */
/* ── Fila de estados: recuadro de color en movimiento ──────────
   Degradé de marca (azul, celestes, amarillo) que se desplaza despacio.
   Sólo se anima background-position (CSS, sin JS). Con "reducir
   movimiento" queda quieto. Alto total fijo: 148 px (el mazo lo usa). */
.est-fila-app { height: 148px; box-sizing: border-box; margin: 0 calc(var(--s4) * -1); padding: 8px 10px; background: var(--tinta, #fff); overflow: hidden; }
.est-fila-app[hidden] { display: none; }
/* Pro en Muro: nunca ocultar la fila del + aunque quede hidden por carrera. */
.est-fila-app.est-pro-subir { display: block !important; height: 148px; }
.est-recuadro { position: relative; height: 100%; box-sizing: border-box; border-radius: 20px; overflow: hidden; padding: 9px 0 0;
  background: linear-gradient(115deg, #0E4C8A 0%, #1A6BB5 18%, #3FA3E0 34%, #0E4C8A 50%, #2F7BC8 64%, #E2A400 80%, #1A6BB5 90%, #0E4C8A 100%);
  background-size: 320% 320%; background-position: 0% 50%;
  animation: estFondo 14s ease-in-out infinite alternate;
  box-shadow: 0 6px 18px rgba(14,76,138,.28), inset 0 0 0 1px rgba(255,255,255,.18); }
/* velo suave para que el texto blanco se lea igual sobre el celeste y el amarillo */
.est-recuadro::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,18,31,.32), rgba(6,18,31,.12) 45%, rgba(6,18,31,.30)); pointer-events: none; }
.est-recuadro > * { position: relative; }
@keyframes estFondo { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.est-titulo { display: flex; align-items: center; gap: 7px; margin: 0 14px 7px; color: #fff; font: 600 13px/1.2 var(--texto, inherit);
  letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-titulo b { font-weight: 800; color: #FFE08A; }
.est-titulo-sep { opacity: .7; }
.est-envivo { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #FF3B4E; box-shadow: 0 0 0 0 rgba(255,59,78,.7); animation: estEnVivo 1.4s ease-out infinite; }
@keyframes estEnVivo { 0% { box-shadow: 0 0 0 0 rgba(255,59,78,.75); opacity: 1; } 60% { box-shadow: 0 0 0 7px rgba(255,59,78,0); opacity: .55; } 100% { box-shadow: 0 0 0 0 rgba(255,59,78,0); opacity: 1; } }
.est-fila { display: flex; gap: 12px; overflow-x: auto; padding: 0 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.est-fila::-webkit-scrollbar { display: none; }
.est-circ { position: relative; flex: 0 0 auto; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  scroll-snap-align: start; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.est-anillo { width: 64px; height: 64px; border-radius: 50%; padding: 3px; box-sizing: border-box;
  background: conic-gradient(from 200deg, #FFD34D, #FFFFFF, #FFB300, #FFD34D); display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(6,18,31,.35); }
.est-anillo.visto { background: rgba(255,255,255,.5); }
.est-anillo-marca, .est-anillo-marca.visto { background: #fff; }
.est-anillo > img, .est-anillo > .est-ini, .est-anillo > .est-marca-av { width: 58px; height: 58px; max-width: none; border-radius: 50%;
  border: 3px solid #0B2D52; object-fit: cover; background: #EAF1F8; box-sizing: border-box; }
.est-ini { display: grid; place-items: center; font: 800 22px/1 var(--display); color: var(--azul); }
.est-marca-av { display: grid; place-items: center; background: var(--azul) !important; }
.est-marca-av img { width: 58%; height: 58%; object-fit: contain; filter: brightness(0) invert(1); }
.est-nom { font-size: 12px; line-height: 1.2; color: #fff; font-weight: 600; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.est-circ-marca .est-nom { color: #FFE08A; font-weight: 800; }
.est-anillo-vacio { background: rgba(255,255,255,.35); border: 2px dashed rgba(255,255,255,.85); padding: 2px; }
.est-anillo { position: relative; }
.est-mas {
  position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--azul, #0E4C8A); color: #fff; border: 2px solid #fff;
  display: grid; place-items: center; font: 700 14px/1 system-ui, sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: auto; z-index: 1;
}
.est-circ-subir .est-nom { font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .est-recuadro { animation: none; background-position: 30% 50%; }
  .est-envivo { animation: none; }
}

/* El mazo va fijo a la ventana (app-mazo-full.css). Con la fila visible, la
   fila se fija debajo de la cabecera y el mazo arranca 148 px más abajo. */
@media (max-width: 759px) {
  .est-fila-app:has(+ .vista-mazo) { position: fixed; left: 0; right: 0; z-index: 2; margin: 0;
    top: var(--alto-barra, calc(64px + env(safe-area-inset-top))); }
  .est-fila-app:not([hidden]) + .vista-mazo { top: calc(var(--alto-barra, calc(64px + env(safe-area-inset-top))) + 148px); }
}
@media (min-width: 760px) {
  .est-fila-app { margin: 0 calc(var(--s6) * -1); padding: 10px 24px; }
  .est-fila { padding: 0 18px; }
  .est-titulo { margin: 0 18px 7px; font-size: 13.5px; }
  .est-fila-app:has(+ .vista-mazo) { position: fixed; left: 218px; right: 0; top: 58px; z-index: 2; margin: 0; }
  .est-fila-app:not([hidden]) + .vista-mazo { top: 206px; }
}


/* Bloque del Perfil */
.est-perfil { background: var(--azul); color: #fff; border-radius: var(--r-lg, 18px); padding: 16px; margin-bottom: 8px; }
.est-perfil-txt { font-size: 14.5px; line-height: 1.45; color: rgba(255,255,255,.9); }
.est-perfil .est-btn-azul { background: #fff; color: var(--azul); }
.est-perfil .est-sub { color: rgba(255,255,255,.85); }
.est-cupo { font-size: 13px; margin-top: 8px; color: rgba(255,255,255,.85); }
.est-mios { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.est-mio { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; background: rgba(255,255,255,.12); border-radius: 12px; padding: 8px; }
.est-mio img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.est-mio p { font-size: 14px; line-height: 1.3; margin: 0; }
.est-mio small { font-size: 12px; opacity: .85; }
.est-perfil .rojo { color: #FFB4AE; }
.rojo { color: var(--coral); }

.est-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 99px; padding: 13px 20px;
  font: 600 15px/1.1 var(--texto, inherit); border: 0; cursor: pointer; background: none; color: inherit; }
.est-btn:disabled { opacity: .5; cursor: default; }
.est-btn-azul { background: var(--azul); color: #fff; }
.est-btn-amarillo { background: var(--plomo); color: var(--cal); }
.est-btn-borde { border: 1.5px solid currentColor; }
.est-btn-bloque { width: 100%; margin-top: 10px; }
.est-btn-chico { padding: 8px 12px; font-size: 13px; }
.est-btn-denuncia { color: #fff; border: 1.5px solid rgba(255,255,255,.55); padding: 12px 14px; font-size: 13px; }

/* Visor */
body.est-visor-abierto { overflow: hidden; }
.est-visor { position: fixed; inset: 0; z-index: 1000; background: #06121F; color: #fff; display: flex; flex-direction: column;
  animation: estEntra .22s ease; touch-action: none; }
@keyframes estEntra { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.est-v-barras { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.est-v-barra { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.est-v-barra i { display: block; height: 100%; width: 0; background: #fff; }
.est-v-barra.hecha i { width: 100%; }
.est-v-cabeza { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 22px); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; z-index: 3;
  text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.est-v-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; background: var(--tinta-3, #EAF1F8); flex: 0 0 auto; }
.est-v-av > img, .est-v-av > .est-ini, .est-v-av > .est-marca-av { width: 100%; height: 100%; object-fit: cover; font-size: 16px; border: 0; border-radius: 50%; }
.est-v-quien { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.est-v-nombre { font-size: 15px; }
.est-v-meta { font-size: 12px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-v-cerrar { width: 40px; height: 40px; border-radius: 50%; font-size: 18px; color: #fff; background: none; border: 0; cursor: pointer; }
.est-v-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.est-v-zonas { position: absolute; inset: 70px 0 150px; display: grid; grid-template-columns: 1fr 2fr; z-index: 2; }
.est-v-zonas button { background: none; border: 0; }
.est-v-pie { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 40px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: linear-gradient(180deg, rgba(6,18,31,0) 0%, rgba(6,18,31,.85) 45%); }
.est-v-texto { font-size: 17px; line-height: 1.4; margin: 0 0 12px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.est-v-acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.est-v-acciones .est-btn-amarillo { flex: 1; }
.est-v-queda { font-size: 13px; opacity: .85; flex: 1; }
.est-sello { display: inline-block; font: 500 11px/1 var(--dato, monospace); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px;
  background: var(--tinta-3, #EAF1F8); color: var(--azul); }
.est-sello.rojo { background: #FCE3E1; color: var(--coral); }
@media (min-width: 760px) {
  .est-v-pie, .est-v-cabeza, .est-v-barras { max-width: 560px; margin: 0 auto; }
  .est-v-cabeza, .est-v-barras { left: 0; right: 0; padding: 0 12px; }
}

/* Hoja */
.est-hoja { position: fixed; inset: 0; z-index: 1010; display: flex; align-items: flex-end; justify-content: center; }
.est-hoja-fondo { position: absolute; inset: 0; background: rgba(6,18,31,.55); }
.est-hoja-panel { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #fff; color: var(--cal); border-radius: 22px 22px 0 0;
  padding: 22px 18px calc(env(safe-area-inset-bottom, 0px) + 18px); animation: estSube .25s ease; box-sizing: border-box; }
@keyframes estSube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.est-hoja-panel h2 { font-size: 24px; margin: 0; }
.est-sub { font-size: 14.5px; color: var(--cal-2, #33414F); line-height: 1.5; margin: 6px 0 12px; }
.est-rotulo { display: block; font: 500 11px/1.2 var(--dato, monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--cal-3, #5B6B7B); }
.est-motivos { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.est-motivo { text-align: left; padding: 14px; border: 1px solid var(--linea); border-radius: 12px; font-size: 15px; background: var(--tinta-2, #F5F8FB); cursor: pointer; color: inherit; }
.est-foto-elegir { display: block; margin-top: 12px; border: 2px dashed var(--linea); border-radius: 18px; overflow: hidden; cursor: pointer; background: var(--tinta-2, #F5F8FB); }
.est-foto-vacia { height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 40px; color: var(--azul); }
.est-foto-vacia[hidden] { display: none; }
.est-foto-vacia small { font-size: 14px; color: var(--cal-2, #33414F); }
#estFotoPrevia { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #000; }
#estFotoPrevia[hidden] { display: none; }
.est-peso { font-size: 12.5px; color: var(--cal-3, #5B6B7B); margin: 6px 2px 0; min-height: 18px; }
.est-campo { display: block; margin-top: 10px; }
.est-campo textarea { width: 100%; box-sizing: border-box; margin-top: 6px; border: 1px solid var(--linea); border-radius: 12px; padding: 12px; font: inherit; font-size: 16px; resize: none; }
.est-contador { display: block; text-align: right; font-size: 12px; color: var(--cal-3, #5B6B7B); }
.est-brindis { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 1020;
  background: var(--cal); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw; }
body.est-visor-abierto #brindis { z-index: 1030; }
/* Me gusta (anónimos) */
.est-btn-corazon { color: #fff; border: 1.5px solid rgba(255,255,255,.55); padding: 10px 14px; font-size: 15px; gap: 6px; min-width: 64px; }
.est-btn-corazon .est-corazon { font-size: 20px; line-height: 1; }
.est-btn-corazon.activo { border-color: #FF5A6E; color: #FF8A98; }
.est-btn-corazon.activo .est-corazon { color: #FF5A6E; animation: estLatido .3s ease; }
@keyframes estLatido { 50% { transform: scale(1.3); } }
.est-v-megusta { font-size: 14px; font-weight: 600; color: #FF8A98; }
