/**
 * ==============================================================================
 * Archivo: login.css
 * Ruta: localpadel/includes/modules/players/ui/login/login.css
 *
 * Descripción:
 *   UI login /jugador/ (magic link) - iOS premium, scoped.
 *   - ✅ Las cajas internas se adaptan al tamaño de la caja grande (no flotan)
 *   - ✅ Paneles integrados (look iOS): sin “tarjeta dentro de tarjeta” fea
 *   - Responsive móvil sí o sí
 *   - Desktop: 60/40
 *   - Robot rojo/verde con animación
 *   - Botón submit disabled hasta robot OK (lo hace el JS)
 *   - Flash muy visuales + movimiento
 *
 * Versión: 1.8.0
 * Autor: Alberto Aranda Aranda
 * Último cambio: 2025-12-24 Europe/Madrid
 * ==============================================================================
 */

.lp-wrap.lp-players{
  font-family:"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgba(15,23,42,.94);

  --lp-brand:#2C4A9C;
  --lp-ink:rgba(15,23,42,.94);
  --lp-muted:rgba(100,116,139,1);
  --lp-border:rgba(15,23,42,.10);

  --lp-card:rgba(255,255,255,.92);

  --lp-shadow:0 18px 55px rgba(2,6,23,.10);
  --lp-shadow-soft:0 10px 24px rgba(2,6,23,.08);

  --lp-radius:22px;

  /* Panel (cards internas) */
  --lp-panel-bg: rgba(255,255,255,.70);
  --lp-panel-bd: rgba(15,23,42,.08);

  /* Robot */
  --lp-robot-red-bg: rgba(239,68,68,.11);
  --lp-robot-red-bd: rgba(239,68,68,.25);
  --lp-robot-green-bg: rgba(16,185,129,.13);
  --lp-robot-green-bd: rgba(16,185,129,.30);

  /* Flash */
  --lp-ok-bg: rgba(16,185,129,.12);
  --lp-ok-bd: rgba(16,185,129,.28);
  --lp-err-bg: rgba(239,68,68,.12);
  --lp-err-bd: rgba(239,68,68,.28);
  --lp-info-bg: rgba(59,130,246,.10);
  --lp-info-bd: rgba(59,130,246,.24);
}

@media (prefers-reduced-motion: reduce){
  .lp-anim-in,
  .lp-flash,
  .lp-btn,
  .lp-robot{ animation:none !important; transition:none !important; }
}

/* =========================
   Caja grande (hero)
   ========================= */

.lp-wrap.lp-players .lp-card{
  border:1px solid var(--lp-border);
  border-radius:var(--lp-radius);
  background:var(--lp-card);
  box-shadow:var(--lp-shadow);

  /* ✅ este padding es el “marco” */
  padding:24px;

  /* ancho coherente */
  max-width:1240px;
  margin:16px auto;
}

@media (max-width: 520px){
  .lp-wrap.lp-players .lp-card{ padding:16px; }
}

/* =========================
   HERO background
   ========================= */

.lp-login-hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(1100px 600px at 70% 0%, rgba(44,74,156,.14), transparent 60%),
    radial-gradient(820px 460px at 12% 36%, rgba(99,102,241,.10), transparent 55%),
    rgba(255,255,255,.92);
}
.lp-login-hero:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,0));
  pointer-events:none;
}

/* =========================
   Head
   ========================= */

.lp-login-head{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.lp-login-head__icon{
  width:46px;
  height:46px;
  border-radius:16px;
  border:1px solid rgba(44,74,156,.18);
  background: rgba(44,74,156,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  box-shadow:0 12px 26px rgba(44,74,156,.12);
  overflow:hidden;
}
.lp-login-head__icon img{
  width:30px;
  height:30px;
  display:block;
  object-fit:contain;
}

.lp-login-hero__title{
  font-size:22px;
  font-weight:600;
  letter-spacing:-.25px;
  margin-top:-1px;
}
.lp-login-hero__sub{
  margin-top:6px;
  color: var(--lp-muted);
  font-size:13px;
  line-height:1.55;
  max-width:72ch;
}

/* =========================
   GRID: que “rellene” la caja grande
   ========================= */

.lp-login-grid{
  display:grid;
  gap:18px;
  margin-top:18px;

  /* ✅ importantísimo: el grid ocupa todo */
  width:100%;
  align-items:stretch;
}

/* Desktop: 60/40 pero sin islas */
@media (min-width: 920px){
  .lp-login-grid{
    grid-template-columns: 1.25fr .85fr;
  }
}

/* Móvil: 1 columna sí o sí */
@media (max-width: 919px){
  .lp-login-grid{
    grid-template-columns: 1fr;
  }
}

/* =========================
   Paneles internos (adiós “tarjeta dentro de tarjeta”)
   ========================= */

.lp-card.lp-card--inner{
  /* ✅ se convierten en “panel” integrado */
  width:100%;
  margin:0;
  max-width:none;

  background: var(--lp-panel-bg);
  border:1px solid var(--lp-panel-bd);

  /* sin sombra fuerte (la caja grande ya tiene) */
  box-shadow:none;

  border-radius:20px;
  padding:20px;

  /* que estiren */
  height:100%;
}

@media (max-width: 520px){
  .lp-card.lp-card--inner{ padding:14px; border-radius:18px; }
}

/* Panel derecho: que no parezca vacío */
@media (min-width: 920px){
  .lp-login-aside{
    /* ocupa su columna completa */
    justify-self: stretch;
  }
}

/* Sticky suave solo desktop */
@media (min-width: 980px){
  .lp-login-aside{
    position: sticky;
    top: 14px;
    align-self: start;
  }
}

/* =========================
   Form
   ========================= */

.lp-login-form .lp-field{ margin-top:12px; }

.lp-login-form .lp-label{
  display:block;
  font-size:12px;
  color: var(--lp-muted);
  margin-bottom:6px;
}

.lp-login-input{ position:relative; }

.lp-login-input__icon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  width:30px;
  height:30px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(148,163,184,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(15,23,42,.78);
  pointer-events:none;
}

.lp-login-form input[type="email"]{
  width:100%;
  border:1px solid rgba(15,23,42,.12);
  border-radius:18px;
  padding:12px 12px 12px 54px;
  font-size:14px;
  background: rgba(255,255,255,.94);
  color: var(--lp-ink);
  box-shadow:0 8px 18px rgba(2,6,23,.06);
  transition: box-shadow .12s ease, border-color .12s ease;
}
.lp-login-form input[type="email"]::placeholder{
  color: rgba(100,116,139,.75);
}
.lp-login-form input[type="email"]:focus{
  border-color: rgba(44,74,156,.30);
  box-shadow:0 0 0 4px rgba(44,74,156,.14), 0 10px 24px rgba(2,6,23,.08);
}

/* Actions */
.lp-login-actions{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.lp-muted{
  color: var(--lp-muted);
  font-size:13px;
  line-height:1.45;
}

/* Buttons */
.lp-btn{
  appearance:none;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  color: var(--lp-ink);
  border-radius:16px;
  padding:11px 14px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  box-shadow:var(--lp-shadow-soft);
  min-height:44px;
}
.lp-btn:hover{ transform: translateY(-1px); box-shadow:0 14px 28px rgba(2,6,23,.10); }
.lp-btn:active{ transform: translateY(0); box-shadow:var(--lp-shadow-soft); }

.lp-btn--primary{
  background: linear-gradient(180deg, rgba(44,74,156,1), rgba(44,74,156,.92));
  color:#fff;
  border-color: rgba(44,74,156,.35);
}

/* Disabled */
.lp-btn[disabled],
.lp-btn[aria-disabled="true"]{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
  box-shadow:0 10px 24px rgba(2,6,23,.06) !important;
  filter:saturate(.9);
}

/* Loading */
.lp-btn.is-loading{
  pointer-events:none;
  opacity:.92;
}
.lp-btn__spinner{
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.55);
  border-top-color: rgba(255,255,255,1);
  animation: lp-spin 0.8s linear infinite;
}
@keyframes lp-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

/* Mobile actions full width */
@media (max-width: 520px){
  .lp-login-actions{
    display:grid !important;
    grid-template-columns: 1fr !important;
    align-items:stretch !important;
  }
  .lp-login-actions .lp-muted{ text-align:center; }
  .lp-btn{ width:100% !important; }
}

/* =========================
   Flash
   ========================= */

.lp-anim-in{ animation: lp-in .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lp-in{
  from{ opacity:0; transform: translateY(-8px); }
  to{ opacity:1; transform: translateY(0); }
}

.lp-flash{
  position:relative;
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:14px;
  border-radius:20px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.88);
  overflow:hidden;
  animation: lp-in .42s cubic-bezier(.2,.8,.2,1) both;
}

.lp-flash__icon{
  width:48px; height:48px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  box-shadow:0 12px 26px rgba(2,6,23,.08);
  font-size:18px;
  background: rgba(255,255,255,.78);
}

.lp-flash__pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(148,163,184,.12);
  color: rgba(15,23,42,.82);
}

.lp-flash__t{
  font-size:14px;
  font-weight:600;
  letter-spacing:-.2px;
  margin-top:6px;
}
.lp-flash__m{
  margin-top:6px;
  font-size:13px;
  color: var(--lp-muted);
  line-height:1.5;
}

.lp-flash--ok{
  border-color: var(--lp-ok-bd);
  background: var(--lp-ok-bg);
}
.lp-flash--ok:after{
  content:"";
  position:absolute;
  top:-40%;
  left:-40%;
  width:60%;
  height:180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: rotate(18deg);
  animation: lp-shine 1.2s ease-out 1;
  pointer-events:none;
}
@keyframes lp-shine{
  from{ transform: translateX(-20%) rotate(18deg); opacity:0; }
  20%{ opacity:1; }
  to{ transform: translateX(220%) rotate(18deg); opacity:0; }
}

.lp-flash--err{ border-color: var(--lp-err-bd); background: var(--lp-err-bg); }
.lp-flash--info{ border-color: var(--lp-info-bd); background: var(--lp-info-bg); }

/* =========================
   Robot
   ========================= */

.lp-robot{
  margin-top:12px;
  border:1px solid var(--lp-robot-red-bd);
  border-radius:18px;
  background: var(--lp-robot-red-bg);
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  user-select:none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.lp-robot:hover{ box-shadow:0 14px 30px rgba(2,6,23,.08); }

.lp-robot.is-checked{
  background: var(--lp-robot-green-bg);
  border-color: var(--lp-robot-green-bd);
  box-shadow:0 0 0 4px rgba(16,185,129,.10), 0 14px 30px rgba(2,6,23,.08);
}

.lp-robot.is-pop{ animation: lp-pop .22s ease-out 1; }
@keyframes lp-pop{
  0%{ transform: scale(.98); }
  65%{ transform: scale(1.01); }
  100%{ transform: scale(1); }
}

.lp-robot__left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.lp-robot__box{
  width:22px;
  height:22px;
  border-radius:6px;
  border:1px solid rgba(15,23,42,.18);
  background: rgba(255,255,255,.92);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.lp-robot.is-checked .lp-robot__box{
  border-color: rgba(16,185,129,.40);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}

.lp-robot__tick{
  font-size:14px;
  line-height:1;
  color: rgba(16,185,129,1);
  opacity:0;
  transform: translateY(1px);
  transition: opacity .12s ease;
}
.lp-robot.is-checked .lp-robot__tick{ opacity:1; }

.lp-robot__txt{ min-width:0; }
.lp-robot__title{
  font-size:14px;
  font-weight:600;
  letter-spacing:-.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.lp-robot__hint{
  margin-top:2px;
  font-size:12px;
  color: var(--lp-muted);
}

@media (max-width: 520px){
  .lp-robot{ align-items:flex-start; }
  .lp-robot__title{
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
  }
}

.lp-robot__right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.lp-robot__refresh{
  width:36px;
  height:36px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.90);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow:var(--lp-shadow-soft);
}
.lp-robot__refresh:hover{ transform: translateY(-1px); box-shadow:0 14px 28px rgba(2,6,23,.10); }
.lp-robot__refresh:active{ transform: translateY(0); }

.lp-robot__refresh svg{ width:16px; height:16px; display:block; }
.lp-robot.is-loading .lp-robot__refresh svg{ animation: lp-spin .8s linear infinite; }

.lp-robot__input{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* =========================
   Aside
   ========================= */

.lp-login-aside__title{
  font-size:13px;
  font-weight:600;
  letter-spacing:-.2px;
  margin:0 0 8px 0;
}
.lp-login-steps{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
.lp-login-step{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(148,163,184,.10);
}
.lp-login-step__n{
  width:28px;
  height:28px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.85);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:600;
  color: rgba(15,23,42,.82);
  flex-shrink:0;
}
.lp-login-step__t{
  font-size:13px;
  color: rgba(15,23,42,.84);
  line-height:1.45;
}

/* Focus */
.lp-wrap.lp-players a:focus,
.lp-wrap.lp-players button:focus,
.lp-wrap.lp-players input:focus{ outline:none; }

.lp-wrap.lp-players a:focus-visible,
.lp-wrap.lp-players button:focus-visible,
.lp-wrap.lp-players input:focus-visible{
  box-shadow: 0 0 0 4px rgba(44,74,156,.18);
  border-color: rgba(44,74,156,.35);
}

/* Evitar estilos externos */
.lp-wrap.lp-players a.lp-btn{ text-decoration:none !important; }
