/* ============================================================
   plans.css — Tarjetas públicas de planes (prefijo .pr-)
   negocios.html y precios.html. Las pinta js/plans-ui.js con los
   datos de js/plans-data.js. Reutiliza los tokens de css/styles.css.
   ============================================================ */

/* ---------- Selector Mensual | Anual (solo si PLANS.annualEnabled) ---------- */
.pr-billing-wrap { margin-bottom: clamp(20px, 4vw, 32px); text-align: center; }
.pr-billing {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.pr-billing__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
}
.pr-billing__opt.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.pr-billing__save {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.pr-billing__msg { margin-top: 12px; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Rejilla ---------- */
.pr-plans {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  max-width: 460px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  /* 3 columnas; con subgrid, nombre, frase, precio, lista y botones
     quedan a la misma altura en las tres tarjetas. */
  .pr-plans { max-width: 1040px; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
  @supports (grid-template-rows: subgrid) {
    .pr-plans { grid-template-rows: repeat(8, auto); row-gap: 0; }
    .pr-plans > .pr-plan { display: grid; grid-row: span 8; grid-template-rows: subgrid; }
  }
}

/* ---------- Tarjeta ---------- */
.pr-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 22px 18px;
  transition: border-color .25s var(--ease);
}
.pr-plan:hover { border-color: #cfcfcf; }
.pr-plan--featured,
.pr-plan--featured:hover { border-color: var(--ink); }

.pr-plan__badge {
  position: absolute;
  top: -12px;
  left: 22px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pr-plan__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}
.pr-plan__desc {
  margin-top: 8px;
  font-size: .95rem;
  color: var(--ink-soft);
}
.pr-plan__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 18px;
}
.pr-plan__currency { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink-soft); }
.pr-plan__amount {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.3rem);
  letter-spacing: -.02em;
}
.pr-plan__period { font-size: .95rem; color: var(--muted); }
.pr-plan__billnote { margin-top: 4px; font-size: .82rem; color: var(--muted); }

.pr-plan__features {
  list-style: none;
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 18px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-2);
}
.pr-plan__features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .94rem;
  color: var(--ink-soft);
}
.pr-plan__features li.is-head { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.pr-plan__features svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  stroke: var(--ink);
  stroke-width: 2.2;
  fill: none;
}
.pr-plan__cta { margin-top: 22px; }

/* "Ver más": texto, no botón pesado; área táctil de 44px. */
.pr-plan__toggle {
  justify-self: center;
  align-self: center;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border: 0;
  background: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--muted-2);
  cursor: pointer;
}
.pr-plan__toggle:hover { text-decoration-color: var(--ink); }
.pr-plan__more .pr-plan__features { margin-top: 6px; padding-top: 16px; }
.pr-plan__more:not([hidden]) { animation: prMore .35s var(--ease); }
.pr-plan__seatnote { margin: 14px 0 4px; font-size: .82rem; color: var(--muted); }
@keyframes prMore { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.pr-trial { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.pr-note {
  max-width: 1040px;
  margin: 22px auto 0;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}
.pr-note a { color: var(--ink); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .pr-plan { transition: none; }
  .pr-plan__more:not([hidden]) { animation: none; }
}

/* Estabilidad visual (CLS): las tarjetas se inyectan por JS; se reserva su altura (medida: móvil/tablet ≈1350px, escritorio ≈450px) para que el contenido de abajo no salte. */
.pr-plans:empty { min-height: 1350px; }
@media (min-width: 900px) { .pr-plans:empty { min-height: 450px; } }
