/* ════════════════════════════════════════════════════════════════════
   NV Gestor 6.3 · Plan y pago en Editar / Agregar cuenta (nv-cuenta-630.css)
   Bloque siempre visible debajo de "Cuenta". Solo variables de tema.
   Animaciones con transform y opacity.
   ════════════════════════════════════════════════════════════════════ */
html.nvpl630 {
  --nvpl-a: rgba(var(--nv-accent-rgb, 139,147,255), .13);
  --nvpl-a2: rgba(var(--nv-accent-rgb, 139,147,255), .42);
  --nvpl-ease: cubic-bezier(.2, .8, .2, 1);
  --nvpl-spring: cubic-bezier(.34, 1.4, .64, 1);
}

/* Las secciones viejas de plan y pago se quedan ocultas (sus campos siguen) */
#modal-account.nvpl-on .nvpl-viejo { display: none !important; }
/* Los botones de plan de la 4.2.2 se reemplazan por los de este bloque */
#modal-account.nvpl-on #nva-planchips { display: none !important; }

/* ── Bloque ─────────────────────────────────────────────────────── */
#modal-account .nvpl {
  display: flex !important; flex-direction: column; gap: 10px;
  overflow: visible !important; min-height: auto !important; flex-shrink: 0;
  padding: 12px 14px !important; margin: 0 !important;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg2);
}
.nvpl-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nvpl-t { display: inline-flex; align-items: center; gap: 6px; }
.nvpl-t svg { color: var(--accent2, var(--accent)); }
.nvpl-res { flex: 1; min-width: 0; text-align: right; font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nvpl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.nvpl-lbl { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; min-width: 54px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.nvpl-row-pais .nvpl-lbl, .nvpl-row-pago .nvpl-lbl { min-width: 0; flex-basis: 100%; }

/* Plan: chips */
.nvpl-planes { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.nvpl-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 99px; border: 1px solid var(--border); background: var(--bg3); color: var(--text2);
  font: 700 12.5px/1 inherit; cursor: pointer; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .18s var(--nvpl-spring), box-shadow .18s;
}
.nvpl-chip svg { opacity: .45; transition: opacity .18s, transform .25s var(--nvpl-spring); }
.nvpl-chip:hover { color: var(--text); border-color: var(--nvpl-a2); }
.nvpl-chip:active { transform: scale(.95); }
.nvpl-chip:focus-visible, .nvpl-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nvpl-chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 4px 14px -6px var(--nvpl-a2);
}
.nvpl-chip[aria-pressed="true"] svg { opacity: 1; fill: currentColor; transform: rotate(-12deg) scale(1.1); }
.nvpl-chip-otro { border-style: dashed; }
.nvpl-chip-otro[aria-pressed="true"] svg { fill: none; }

.nvpl-otro { display: none; flex: 1 1 100%; }
.nvpl-otro.on { display: block; animation: nvpl-in .25s var(--nvpl-ease); }
.nvpl-otro input {
  width: 100%; height: 36px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--nvpl-a2); border-radius: 10px; background: var(--bg3); color: var(--text);
  font: 600 13px/1 inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.nvpl-otro input::placeholder { color: var(--text3); }
.nvpl-otro input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--nvpl-a); }
.nvpl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nvpl-vacio { flex: 1 1 100%; font-size: 11.5px; color: var(--text3); }
.nvpl-vacio[hidden] { display: none; }

/* País y pago lado a lado en PC y tablet */
.nvpl-row2 { display: grid; grid-template-columns: minmax(150px, .8fr) 2fr; gap: 10px 14px; align-items: start; }
#modal-account.nvpl-sinpais .nvpl-row2 { grid-template-columns: 1fr; }
#modal-account.nvpl-sinpais .nvpl-row-pais { display: none; }
#modal-account .nvpl #acc-country-group { margin: 0 !important; flex: 1 1 100%; }
#modal-account .nvpl #acc-country-group > label { display: none !important; }
#modal-account .nvpl #acc-country { width: 100%; height: 36px; }

/* Método de pago: control segmentado con indicador que se desliza */
.nvpl-seg {
  position: relative; display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 100%;
  padding: 3px; border-radius: 11px; border: 1px solid var(--border); background: var(--bg3);
}
.nvpl-seg-ind {
  position: absolute; left: 0; top: 0; border-radius: 8px; pointer-events: none; opacity: 0;
  background: var(--accent); box-shadow: 0 4px 14px -6px var(--nvpl-a2);
  transition: transform .28s var(--nvpl-ease), width .28s var(--nvpl-ease), opacity .2s;
}
.nvpl-seg button {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 0; height: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 8px; background: none; color: var(--text2);
  font: 700 12.5px/1 inherit; cursor: pointer; white-space: nowrap; transition: color .18s;
}
.nvpl-seg button:hover { color: var(--text); }
.nvpl-seg button[aria-pressed="true"] { color: #fff; }
.nvpl-seg button[data-v=""][aria-pressed="true"] { color: var(--text); }
.nvpl-seg:has(button[data-v=""][aria-pressed="true"]) .nvpl-seg-ind { background: var(--bg2); box-shadow: 0 0 0 1px var(--border2, var(--border)); }

.nvpl-extra { flex: 1 1 100%; display: grid; grid-template-columns: 1fr; gap: 8px; }
.nvpl-extra:empty { display: none; }
#modal-account .nvpl-extra .form-group { margin: 0 !important; animation: nvpl-in .25s var(--nvpl-ease); }
#modal-account .nvpl-extra .form-group > label { font-size: 10.5px !important; margin-bottom: 4px !important; }
#modal-account .nvpl-extra input { height: 36px; }

/* Chip del plan en la cabecera de "Cuenta" */
.nvpl-hchip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; max-width: 160px;
  border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap;
  color: var(--accent2, var(--accent)); background: var(--nvpl-a); border: 1px solid var(--nvpl-a2);
}
.nvpl-hchip > span { overflow: hidden; text-overflow: ellipsis; }
.nvpl-hchip svg { fill: currentColor; flex-shrink: 0; }
.nvpl-hchip[hidden] { display: none; }

/* Animaciones */
@keyframes nvpl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes nvpl-pop { 0% { transform: scale(.88); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.nvpl-in { animation: nvpl-in .32s var(--nvpl-ease) both; }
.nvpl-pop { animation: nvpl-pop .32s var(--nvpl-spring); }

/* Tablet */
@media (max-width: 900px) {
  .nvpl-row2 { grid-template-columns: 1fr 1.6fr; }
}
/* Celular */
@media (max-width: 640px) {
  #modal-account .nvpl { padding: 12px !important; }
  .nvpl-h { flex-wrap: wrap; }
  .nvpl-res { flex-basis: 100%; text-align: left; white-space: normal; }
  .nvpl-row-plan .nvpl-lbl { flex-basis: 100%; }
  .nvpl-row2 { grid-template-columns: 1fr; }
  .nvpl-chip { height: 36px; padding: 0 14px; font-size: 13px; }
  .nvpl-seg { display: grid; grid-template-columns: 1fr 1fr; }
  .nvpl-seg button { height: 36px; }
  .nvpl-extra { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nvpl-in, .nvpl-pop, .nvpl-otro.on, #modal-account .nvpl-extra .form-group { animation: none !important; }
  .nvpl-seg-ind, .nvpl-chip, .nvpl-chip svg { transition: none !important; }
}
html.nv-liviano .nvpl-in, html.nv-liviano .nvpl-pop, html.nv-liviano .nvpl-otro.on { animation: none !important; }
