/* Raspadita. Los colores de cada tarjeta llegan como variables --rasp-* (ver plantilla-raspadita.php). */

.nc-rasp { margin: .5rem 0 1.5rem; }
.nc-rasp [hidden] { display: none !important; }

.nc-rasp-tarjeta {
  position: relative; max-width: 440px; margin: 0 auto; padding: 1.1rem 1rem 1rem;
  background: var(--rasp-fondo); color: var(--rasp-texto);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.12);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
/* Borde troquelado, como las de papel. */
.nc-rasp-tarjeta::before {
  content: ""; position: absolute; inset: 7px; border: 2px dashed rgba(255,255,255,.28); border-radius: 16px; pointer-events: none;
}

.nc-rasp-cabeza { position: relative; text-align: center; margin-bottom: .75rem; }
.nc-rasp-titulo {
  display: block; font-size: clamp(1.7rem, 8vw, 2.3rem); font-weight: 900; line-height: 1.05;
  text-transform: uppercase; letter-spacing: .02em; color: var(--rasp-acento);
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.nc-rasp-nombre { display: block; font-weight: 700; opacity: .9; margin-top: .2rem; }
.nc-rasp-regla { position: relative; margin: .75rem 0 0; text-align: center; font-size: .95rem; line-height: 1.35; }

.nc-rasp-zona {
  position: relative; border-radius: 14px; overflow: hidden; padding: 8px;
  background: rgba(0,0,0,.2);
}
.nc-rasp-grilla { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; }
.nc-rasp-celda {
  position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--rasp-celda); color: var(--rasp-celda-texto); border-radius: 10px; min-width: 0;
  transition: transform .3s, box-shadow .3s, opacity .3s;
}
.nc-rasp-simbolo { font-size: clamp(1.9rem, 10vw, 2.8rem); line-height: 1; }
.nc-rasp-monto { font-size: clamp(.9rem, 4.3vw, 1.2rem); font-weight: 900; white-space: nowrap; letter-spacing: -.01em; }
.nc-rasp-premio { font-weight: 800; font-size: clamp(.75rem, 3.6vw, .95rem); margin-top: .25rem; white-space: nowrap; }
.nc-rasp-img { width: 72%; height: auto; max-height: 72%; object-fit: contain; pointer-events: none; }
[data-mecanica="simbolo"] .nc-rasp-img { width: 55%; max-height: 55%; }

.nc-rasp-capa {
  position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; border-radius: 14px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='13' fill='%23f5c542' stroke='%23a07a10' stroke-width='3'/%3E%3Ctext x='16' y='21' font-size='14' font-family='sans-serif' font-weight='700' text-anchor='middle' fill='%23a07a10'%3E$%3C/text%3E%3C/svg%3E") 16 16, crosshair;
  transition: opacity .45s;
}
.nc-rasp-capa-fuera { opacity: 0; pointer-events: none; }

.nc-rasp-ganadora {
  box-shadow: 0 0 0 4px var(--rasp-acento), 0 0 22px var(--rasp-acento);
  animation: nc-rasp-latido 1s ease-in-out 3;
  z-index: 1;
}
.nc-rasp-gano .nc-rasp-celda:not(.nc-rasp-ganadora) { opacity: .55; }
@keyframes nc-rasp-latido { 50% { transform: scale(1.08); } }

/* Leyenda de premios (cuando los símbolos no son montos). */
.nc-rasp-leyenda {
  position: relative; list-style: none; margin: .75rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .25rem .75rem; font-size: .88rem;
}
.nc-rasp-leyenda li { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.nc-rasp-leyenda img { width: 1.4em; height: 1.4em; object-fit: contain; }
.nc-rasp-leyenda b { font-size: 1.2em; font-weight: 400; }

/* Con imagen de fondo: la imagen trae título y reglas; la zona va donde diga «diseno.zona». */
.nc-rasp-con-fondo {
  padding: 0; aspect-ratio: var(--rasp-prop); background-image: var(--rasp-imagen);
  background-size: 100% 100%; background-repeat: no-repeat;
}
.nc-rasp-con-fondo::before { display: none; }
.nc-rasp-con-fondo .nc-rasp-cabeza, .nc-rasp-con-fondo .nc-rasp-regla {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0;
}
.nc-rasp-con-fondo .nc-rasp-zona {
  position: absolute; left: var(--zx); top: var(--zy); width: var(--zw); height: var(--zh); padding: 2.5%; background: transparent;
}
.nc-rasp-con-fondo .nc-rasp-grilla { height: 100%; grid-template-rows: repeat(var(--filas), 1fr); gap: 4%; }
.nc-rasp-con-fondo .nc-rasp-celda { aspect-ratio: auto; }
.nc-rasp-con-fondo .nc-rasp-leyenda { display: none; }

.nc-rasp-estado { text-align: center; font-weight: 700; min-height: 1.5em; margin: .75rem 0 .25rem; }
.nc-rasp .nc-acciones { justify-content: center; }
.nc-rasp-imagen { margin-top: .6rem; width: 100%; }

/* Papelitos al ganar. */
.nc-rasp-confeti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.nc-rasp-confeti i {
  position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: .95;
  animation: nc-rasp-cae 1.8s cubic-bezier(.25,.6,.4,1) forwards;
}
@keyframes nc-rasp-cae {
  to { transform: translate(var(--x), 640px) rotate(var(--giro)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nc-rasp-ganadora { animation: none; }
  .nc-rasp-capa { transition: none; }
}

/* Diseños, tabla de premios y texto para lectores de pantalla. */
.nc-rasp-disenos { margin: 0 0 1rem; }
.nc-rasp-disenos .nc-actual { background: var(--nc-acento); border-color: var(--nc-acento); color: var(--nc-acento-texto); }
/* Con muchas tarjetas, en el celular los diseños van en una sola fila que se desliza de costado. */
@media (max-width: 640px) {
  .nc-rasp-disenos .nc-categorias {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 -1rem; padding: .1rem 1rem .3rem; scroll-padding-inline: 1rem; scroll-snap-type: x proximity;
  }
  .nc-rasp-disenos .nc-categorias::-webkit-scrollbar { display: none; }
  .nc-rasp-disenos .nc-categorias li { flex-shrink: 0; scroll-snap-align: start; }
  .nc-rasp-disenos .nc-categorias a { white-space: nowrap; }
}
.nc-rasp-tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.nc-rasp-tabla th, .nc-rasp-tabla td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--nc-borde); }
.nc-rasp-tabla th { font-size: .85rem; opacity: .8; }
.nc-rasp-tabla td:nth-last-child(3), .nc-rasp-tabla td:nth-last-child(2) { white-space: nowrap; }
.nc-rasp-tabla img { width: 1.6em; height: 1.6em; object-fit: contain; vertical-align: middle; }
.nc-rasp-tabla b { font-size: 1.3em; font-weight: 400; }
.nc-texto h3 { font-size: 1rem; margin: 1.2rem 0 .3rem; }
.nc-rasp .screen-reader-text, .nc-texto .screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
