/* ═══════════════════════════════════════════════════════
 * Forenses.net — pmpro.css
 * Estilos para las páginas nativas de Paid Memberships Pro
 * (Niveles/Planes, Checkout, Cuenta de membresía, Confirmación)
 * Usa las mismas variables que main.css (--blue, --border, etc.)
 * ═══════════════════════════════════════════════════════ */

/* ── CONTENEDOR GENERAL ── */
#pmpro_levels,
.pmpro_levels,
[id^="pmpro_level"],
.pmpro_container {
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  max-width: var(--max, 1200px);
  margin: 0 auto;
}

/* ── GRID DE NIVELES/PLANES ── */
#pmpro_levels,
ul#pmpro_levels,
.pmpro_level_boxes {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  list-style: none !important;
  padding: 0 !important;
  margin: 2rem 0 !important;
}

/* Cada tarjeta de plan (cubre varias variantes de clase que usa PMPro) */
.pmpro_level,
.pmpro_level_box,
[class*="pmpro_level_box"],
li[id^="pmpro_level_box"] {
  background: #fff;
  border: 1px solid var(--border, #e1e5f0);
  border-radius: var(--radius-lg, 12px);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(47,101,185,.06);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: all .2s;
}
.pmpro_level:hover,
.pmpro_level_box:hover {
  box-shadow: 0 8px 28px rgba(47,101,185,.14);
  transform: translateY(-3px);
}

/* Nombre del plan */
.pmpro_level h2,
.pmpro_level_box h2,
[class*="pmpro_level_name"],
[class*="pmpro_level-name"] {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--ink, #0f1117) !important;
  margin: 0 0 .3rem 0 !important;
}

/* Precio */
.pmpro_level_cost,
[class*="pmpro_level_price"],
[class*="pmpro_level-price"],
[class*="pmpro_level_cost"] {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--blue, #2f65b9);
  letter-spacing: -.03em;
  margin: .4rem 0;
}

/* Descripción / bullets de features */
.pmpro_level_description,
[class*="pmpro_level_description"] {
  font-size: var(--fs-sm, 14px);
  color: var(--muted, #55596a);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.pmpro_level_description ul,
[class*="pmpro_level_description"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pmpro_level_description li,
[class*="pmpro_level_description"] li {
  padding: .45rem 0;
  border-bottom: 1px solid var(--border, #e1e5f0);
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.pmpro_level_description li::before {
  content: '✓';
  color: var(--blue, #2f65b9);
  font-weight: 700;
  flex-shrink: 0;
}

/* Botón "Seleccionar" */
.pmpro_btn,
a.pmpro_btn,
a[class*="pmpro_btn"],
.pmpro_level a[href*="checkout"],
a[href*="pmpro_level"] {
  display: inline-block !important;
  background: var(--blue, #2f65b9) !important;
  color: #fff !important;
  padding: 12px 28px !important;
  border-radius: var(--radius, 6px) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center;
  margin-top: auto;
  transition: background .18s;
}
.pmpro_btn:hover,
a[class*="pmpro_btn"]:hover,
a[href*="pmpro_level"]:hover {
  background: var(--blue-dark, #1e4a8a) !important;
  text-decoration: none !important;
}

/* Plan activo/actual del usuario */
.pmpro_level.active,
.pmpro_level_box.active,
[class*="pmpro_level"][class*="active"] {
  border: 2px solid var(--blue, #2f65b9);
  position: relative;
}
.pmpro_level.active::before,
.pmpro_level_box.active::before {
  content: 'Tu plan actual';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue, #2f65b9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── FORMULARIO DE CHECKOUT ── */
#pmpro_form,
.pmpro_checkout,
.pmpro_form {
  max-width: 640px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid var(--border, #e1e5f0);
  border-radius: var(--radius-lg, 12px);
  padding: 2rem;
}
#pmpro_form h2,
#pmpro_form h3,
.pmpro_checkout h2,
.pmpro_checkout h3 {
  color: var(--ink, #0f1117);
  margin-bottom: 1rem;
}
#pmpro_form input[type="text"],
#pmpro_form input[type="email"],
#pmpro_form input[type="password"],
#pmpro_form select,
.pmpro_checkout input[type="text"],
.pmpro_checkout input[type="email"],
.pmpro_checkout input[type="password"],
.pmpro_checkout select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-2, #c8cfe0);
  border-radius: var(--radius, 6px);
  font-size: 14px;
  margin-bottom: 1rem;
  font-family: inherit;
}
#pmpro_form input[type="submit"],
.pmpro_checkout input[type="submit"],
.pmpro_btn-submit {
  background: var(--blue, #2f65b9) !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 32px !important;
  border-radius: var(--radius, 6px) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
#pmpro_form input[type="submit"]:hover,
.pmpro_checkout input[type="submit"]:hover {
  background: var(--blue-dark, #1e4a8a) !important;
}

/* ── PÁGINA "CUENTA DE MEMBRESÍA" ── */
.pmpro_account,
#pmpro_account {
  max-width: 800px;
  margin: 2rem auto;
}
.pmpro_actionlink,
a.pmpro_actionlink {
  display: inline-block;
  background: var(--blue, #2f65b9);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius, 6px);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
  margin: .3rem .3rem .3rem 0;
}
.pmpro_actionlink:hover { background: var(--blue-dark, #1e4a8a); }

/* Mensajes de éxito/error de PMPro */
.pmpro_message,
.pmpro_success,
.pmpro_alert {
  padding: 14px 20px;
  border-radius: var(--radius, 6px);
  margin: 1rem 0;
  font-size: 14px;
}
.pmpro_message.pmpro_success,
.pmpro_success {
  background: #e6f7ec;
  border: 1px solid #b7e4c7;
  color: #155724;
}
.pmpro_message.pmpro_error,
.pmpro_alert {
  background: #fdeaea;
  border: 1px solid #f3b8b8;
  color: #842029;
}

/* Responsive */
@media (max-width: 640px) {
  #pmpro_levels { grid-template-columns: 1fr !important; }
  #pmpro_form, .pmpro_checkout { padding: 1.25rem; }
}
