/* =============================================================
   CUENTAS Y REQUISITOS PARA COMPRAR (js/auth.js)
   Usa las variables del sitio, así toma los colores de cada paleta.
   ============================================================= */

/* ---------- Botón de la cabecera ---------- */
.cuenta-btn {
  display: inline-flex; align-items: center; gap: .45rem; flex: none;
  height: 38px; padding: 0 .9rem 0 .7rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  background: transparent; color: inherit; font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
}
.cuenta-btn:hover { border-color: currentColor; }
.cuenta-btn[hidden] { display: none !important; }
.cuenta-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acento); color: #15110B; font-size: .78rem; font-weight: 700;
}
@media (max-width: 720px) {
  .cuenta-btn { width: 38px; padding: 0; justify-content: center; }
  .cuenta-btn-txt { display: none; }
}

/* ---------- Ventana ---------- */
.cuenta-dlg {
  width: min(440px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  padding: 1.75rem 1.5rem 1.5rem; border: 0; border-radius: 18px;
  background: var(--papel, var(--fondo)); color: var(--texto);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .45);
  font-family: var(--fuente-texto);
}
.cuenta-dlg::backdrop { background: rgb(10 8 14 / .55); backdrop-filter: blur(3px); }
.cuenta-dlg[open] { animation: cuenta-in .25s var(--ease, ease) both; }
@keyframes cuenta-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .cuenta-dlg[open] { animation: none; } }

.cuenta-cerrar {
  position: absolute; top: .7rem; right: .7rem; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; color: var(--suave); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.cuenta-cerrar:hover { background: var(--linea); color: var(--texto); }
.cuenta-cab { padding-right: 2rem; }
.cuenta-paso { margin: 0 0 .2rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); font-weight: 600; }
.cuenta-dlg h2 { margin: 0; font-family: var(--fuente-titulos); font-size: 1.7rem; line-height: 1.1; font-weight: 400; }
.cuenta-item { margin: .5rem 0 0; padding: .45rem .7rem; border-radius: 8px; background: var(--linea); font-size: .88rem; font-weight: 500; }

/* Checklist de requisitos */
.cuenta-checks { list-style: none; margin: 1.1rem 0 1rem; padding: 0; display: grid; gap: .35rem; font-size: .86rem; color: var(--suave); }
.cuenta-checks li { display: flex; align-items: center; gap: .55rem; }
.cuenta-checks li > span:first-child {
  width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--texto) 30%, transparent); font-size: .7rem; font-weight: 700;
}
.cuenta-checks li.ok { color: var(--texto); }
.cuenta-checks li.ok > span:first-child { background: #1E8E4E; border-color: #1E8E4E; color: #fff; }

.cuenta-msg { margin: 0 0 1rem; padding: .65rem .8rem; border-radius: 10px; font-size: .88rem; line-height: 1.4; }
.cuenta-msg.error { background: color-mix(in srgb, #D6332F 13%, transparent); color: color-mix(in srgb, #B3261E 85%, var(--texto)); }
.cuenta-msg.ok { background: color-mix(in srgb, #1E8E4E 13%, transparent); color: color-mix(in srgb, #136B3A 85%, var(--texto)); }
.cuenta-msg[hidden] { display: none; }

.cuenta-cuerpo { display: grid; gap: .8rem; }
.cuenta-cuerpo > p { margin: 0; line-height: 1.5; font-size: .95rem; }
.cuenta-demo { margin: 0; padding: .6rem .75rem; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--acento) 70%, transparent); font-size: .8rem; line-height: 1.45; color: var(--suave); }

/* Botones sociales */
.cuenta-sociales { display: grid; gap: .55rem; }
.cuenta-sociales:empty { display: none; }
.cuenta-social {
  display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%;
  padding: .78rem 1rem; border-radius: 12px; border: 1px solid var(--linea);
  background: #fff; color: #1F1F1F; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.cuenta-social:hover { border-color: #9AA0A6; box-shadow: 0 2px 8px -3px rgb(0 0 0 / .2); }
.cuenta-o { display: flex; align-items: center; gap: .8rem; margin: .2rem 0 0; font-size: .8rem; color: var(--suave); }
.cuenta-o::before, .cuenta-o::after { content: ""; flex: 1; height: 1px; background: var(--linea); }

/* Pestañas ingresar / crear cuenta */
.cuenta-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--linea); }
.cuenta-tabs button { padding: .55rem; border: 0; border-radius: 9px; background: transparent; color: var(--suave); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.cuenta-tabs button[aria-selected="true"] { background: var(--papel, var(--fondo)); color: var(--texto); box-shadow: 0 1px 4px rgb(0 0 0 / .12); }

/* Formularios */
.cuenta-form { display: grid; gap: .8rem; }
.cuenta-form label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; }
.cuenta-form input:not([type=checkbox]) {
  width: 100%; padding: .75rem .85rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--texto) 22%, transparent);
  background: var(--fondo); color: var(--texto); font: inherit; font-weight: 400; font-size: 1rem;
}
.cuenta-form input:focus-visible { outline: 2px solid var(--primario); outline-offset: 1px; border-color: transparent; }
.cuenta-form input[aria-invalid="true"] { border-color: #D6332F; }
.cuenta-form small, .cuenta-nota { font-weight: 400; color: var(--suave); font-size: .78rem; }
.cuenta-check { grid-template-columns: auto 1fr !important; align-items: start; gap: .6rem !important; font-weight: 400 !important; font-size: .9rem !important; cursor: pointer; }
.cuenta-check input { width: 18px; height: 18px; margin: .1rem 0 0; accent-color: var(--primario); }
.cuenta-cond { font-size: .85rem; border: 1px solid var(--linea); border-radius: 10px; padding: .55rem .75rem; }
.cuenta-cond summary { cursor: pointer; font-weight: 600; }
.cuenta-cond p { margin: .5rem 0 0; line-height: 1.5; color: var(--suave); white-space: pre-line; }

.cuenta-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--texto); font: inherit; font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; opacity: .8; }
.cuenta-link:hover { opacity: 1; }
.cuenta-fila { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cuenta-quien { font-size: .92rem !important; }
.cuenta-ok { display: inline-block; margin-left: .3rem; padding: .1rem .45rem; border-radius: 999px; background: color-mix(in srgb, #1E8E4E 15%, transparent); color: #1E7A45; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.cuenta-dlg .btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Sección "Requisitos para comprar" ---------- */
.requisitos[hidden] { display: none; }
.req-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; counter-reset: req; }
.req-lista li { display: flex; gap: .85rem; padding: 1.1rem; border-radius: var(--r, 14px); border: 1px solid var(--linea); background: color-mix(in srgb, var(--papel, var(--fondo)) 70%, transparent); }
.req-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primario); color: var(--fondo); font-weight: 700; font-size: .85rem; }
.req-lista b { display: block; margin-bottom: .2rem; }
.req-lista p { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--suave); }
.req-condiciones { margin-top: 1.25rem; padding: 1rem 1.2rem; border-left: 3px solid var(--acento); font-size: .9rem; color: var(--suave); }
.req-condiciones h3 { margin: 0 0 .3rem; font-size: .95rem; color: var(--texto); }
.req-condiciones p { margin: 0; line-height: 1.55; white-space: pre-line; }
