/* /planes — los planes de miembro (mockups/wilep-v3-planes.html, pantalla 1). Tokens de piel.css (las 4 paletas), un solo acento,
   nada por debajo de 12 px. Prefijo wp-pl para no chocar con publica.css. Teléfono primero; 2 columnas desde 640 px y 5 desde 1000 px. */
.wp-pl-cab { padding: 28px 0 4px; }
.wp-pl-cab h1 { font-size: 32px; font-weight: 300; line-height: 1.08; letter-spacing: -.025em; max-width: 760px; }
.wp-pl-cab h1 b { font-weight: 500; }
.wp-pl-pronto { display: flex; flex-direction: column; gap: 2px; background: var(--ink); color: var(--bg); border-radius: var(--r-sm); padding: 14px 16px; margin-top: 16px; }
.wp-pl-pronto b { font-weight: 500; font-size: 15px; }
.wp-pl-pronto small { font-size: 13px; opacity: .8; }
.wp-pl-estado { margin-top: 16px; background: var(--surf); border-radius: var(--r-sm); box-shadow: var(--csh); padding: 14px 16px; display: grid; gap: 8px; font-size: 14px; }
.wp-pl-estado[hidden] { display: none; }
.wp-pl-estado.ok { border-left: 4px solid var(--ok); }
.wp-pl-estado button { justify-self: start; font: inherit; font-size: 13px; background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }

.wp-planes { display: grid; gap: 14px; margin-top: 22px; grid-template-columns: 1fr; }
.wp-pl { position: relative; background: var(--surf); border-radius: var(--r-sm); box-shadow: var(--csh); padding: 18px 16px 16px; display: flex; flex-direction: column; }
.wp-pl.gratis { background: transparent; box-shadow: none; border: 1.5px dashed var(--muted2); }
.wp-pl.tuyo { outline: 2px solid var(--ok); }
.wp-pl .tuyo-marca { position: absolute; top: -11px; left: 16px; background: var(--acc); color: var(--acc-ink); font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; }
.wp-pl .tuyo-marca { background: var(--ok); color: #fff; }
.wp-pl .nombre { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wp-pl .precio { font-size: 34px; font-weight: 300; letter-spacing: -.02em; line-height: 1; margin-top: 8px; }
.wp-pl .precio small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.wp-pl .pormes { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 18px; }
.wp-pl ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; line-height: 1.35; }
.wp-pl li { display: flex; gap: 8px; align-items: flex-start; }
.wp-pl li .trazo { width: 16px; height: 16px; color: var(--ok); margin-top: 1px; }
.wp-pl li.no { color: var(--muted2); }
.wp-pl li.no .trazo { color: var(--muted2); }
.wp-pl .boton { margin-top: auto; padding-top: 16px; }
.wp-pl .boton .wp-btn { min-height: 44px; font-size: 14px; box-shadow: none; }
.wp-pl .boton .wp-btn[disabled] { opacity: .55; cursor: default; }
.wp-pl .boton span.wp-btn { cursor: default; }

/* El premio del mes (solo si el admin cargó uno): foto, nombre, valor de mercado y quién lo pone. Nunca un monto de fondo ni un porcentaje. */
.wp-pl-premio { display: flex; gap: 14px; align-items: center; margin-top: 18px; background: var(--surf); border-radius: var(--r-sm); box-shadow: var(--csh); padding: 14px 16px; }
.wp-pl-premio .foto { width: 84px; height: 84px; flex: none; border-radius: 14px; overflow: hidden; background: var(--field); }
.wp-pl-premio .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-pl-premio .txt { display: grid; gap: 3px; font-size: 13px; color: var(--muted); line-height: 1.4; min-width: 0; }
.wp-pl-premio .txt small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.wp-pl-premio .txt b { font-size: 18px; font-weight: 500; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }

/* Negocios aliados del club (server/aliados.js): nombre, zona y el cupón solo miembros vigente */
.wp-pl-aliados { margin-top: 26px; background: var(--surf); border-radius: var(--r-sm); box-shadow: var(--csh); padding: 16px; }
.wp-pl-aliados .t { display: grid; gap: 2px; }
.wp-pl-aliados .t b { font-weight: 500; font-size: 16px; }
.wp-pl-aliados .t small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.wp-pl-aliados .lista { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.wp-pl-aliados li { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.wp-pl-aliados .nom { display: grid; gap: 1px; min-width: 0; }
.wp-pl-aliados .nom a { font-weight: 500; font-size: 15px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.wp-pl-aliados .nom small { color: var(--muted); font-size: 13px; }
.wp-pl-aliados .cupon { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--field); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--ink); text-decoration: none; min-height: 44px; }
.wp-pl-aliados .cupon span { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.wp-pl-aliados .cupon em { font-style: normal; font-weight: 500; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.wp-pl-aliados .cupon i { font-style: normal; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.wp-pl-aliados .vacio { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
/* Cuenta de un país sin sorteos (js/planes.js pone data-sin-sorteos en <html>): nada de lo que nombra un sorteo, y el QR es solo de Bolivia */
[data-sin-sorteos] [data-sorteos], [data-sin-sorteos] [data-solo-bo] { display: none !important; }
/* La tarjeta para planes es solo fuera de Bolivia (server/cobros.js) */
.wp-pl-pie [data-fuera-bo] { display: none; }
[data-sin-sorteos] .wp-pl-pie [data-fuera-bo] { display: inline-flex; }
.wp-pl-regla { margin-top: 14px; border-left: 3px solid var(--acc); padding: 4px 0 4px 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.wp-pl-regla b { font-weight: 500; color: var(--ink); }

.wp-pl-escalera { margin-top: 26px; background: var(--surf); border-radius: var(--r-sm); box-shadow: var(--csh); padding: 16px; }
.wp-pl-escalera .t { display: grid; gap: 2px; }
.wp-pl-escalera .t b { font-weight: 500; font-size: 16px; }
.wp-pl-escalera .t small { color: var(--muted); font-size: 13px; }
.wp-pl-escalera .sorteos { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: 1fr; }
.wp-pl-escalera > p { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.wp-pl-sorteo { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.wp-pl-sorteo .k { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wp-pl-sorteo b { display: block; font-weight: 500; font-size: 15px; margin-top: 2px; }
.wp-pl-sorteo .premio { color: var(--muted); margin-top: 4px; }
.wp-pl-sorteo .ver { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.wp-pl-sorteo .puertas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.wp-pl-sorteo .puerta { background: var(--field); border-radius: 10px; padding: 8px 10px; }
.wp-pl-sorteo .puerta small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.wp-pl-sorteo .puerta.plan { background: var(--ink); color: var(--bg); }
.wp-pl-sorteo .puerta.plan small { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.wp-pl-pie { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.wp-pl-pie span { display: inline-flex; gap: 6px; align-items: center; }
.wp-pl-pie .trazo { width: 15px; height: 15px; }
.wp-pl-pie a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

/* Hoja de pago (public/js/planes.js) */
.pl-velo { position: fixed; inset: 0; z-index: 30; background: rgba(31, 29, 26, .45); display: flex; align-items: flex-end; justify-content: center; }
.pl-hoja { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--surf); color: var(--ink); border-radius: 26px 26px 0 0; padding: 20px 18px 24px; display: grid; gap: 12px; }
.pl-hoja h2 { font-size: 20px; font-weight: 500; }
.pl-hoja p, .pl-hoja small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.pl-hoja .monto { font-size: 30px; font-weight: 300; letter-spacing: -.02em; color: var(--ink); }
.pl-hoja .qr { display: grid; place-items: center; background: var(--field); border-radius: 16px; padding: 12px; }
.pl-hoja .qr img { width: 100%; max-width: 240px; border-radius: 10px; background: #fff; }
.pl-hoja .ref { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--field); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.pl-hoja .ref b { font-weight: 500; letter-spacing: .04em; }
.pl-hoja input[type=file], .pl-hoja input[type=number] { font: inherit; font-size: 14px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--ink); min-height: 44px; }
.pl-hoja .fila { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-hoja .fila .wp-btn { flex: 1; min-width: 140px; }
.pl-hoja .error { color: #B3321D; font-size: 13px; }
/* Compra en cuatro pasos (mockup del club, B) */
.pl-hoja .pl-paso { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pl-hoja .pl-incluye ul { list-style: none; display: grid; gap: 6px; padding: 0; margin: 0; font-size: 14px; color: var(--ink); }
.pl-hoja .pl-incluye li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.pl-hoja .pl-incluye li svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pl-hoja .pl-premio-mini { background: var(--field); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink); }
.pl-hoja .pl-regla { border-left: 3px solid var(--acc); padding: 2px 0 2px 10px; font-size: 13px; color: var(--ink); line-height: 1.45; }
.pl-hoja .pl-campo { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pl-hoja .pl-campo input { font: inherit; font-size: 15px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--ink); min-height: 44px; }
.pl-hoja .pl-reservado { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.pl-hoja .pl-reservado b { font-weight: 500; font-size: 13px; color: var(--ink); }
.pl-hoja .pl-enlace { font: inherit; font-size: 13px; background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; justify-self: center; }
.pl-hoja .cerrar { justify-self: end; font: inherit; font-size: 13px; background: none; border: 0; color: var(--muted); cursor: pointer; min-height: 32px; }

@media (min-width: 640px) {
  .wp-planes { grid-template-columns: 1fr 1fr; }
  /* Cinco sorteos (18-nov): el del barrio a lo ancho y los cuatro de plan debajo, de a dos */
  .wp-pl-escalera .sorteos { grid-template-columns: 1fr 1fr; }
  .wp-pl-escalera .sorteos > :not([data-tipo]) { grid-column: 1 / -1; }
  .wp-pl-aliados li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 14px; }
  .pl-velo { align-items: center; }
  .pl-hoja { border-radius: 26px; }
}
@media (min-width: 1000px) {
  .wp-pl-cab { padding-top: 48px; }
  .wp-pl-cab h1 { font-size: 46px; }
  .wp-planes { grid-template-columns: repeat(min(var(--n, 5), 5), 1fr); gap: 12px; }
  .wp-pl .precio { font-size: 30px; }
  .wp-pl-escalera .sorteos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wp-pl-sorteo[data-tipo] .puertas { grid-template-columns: 1fr; }
}
