/* ==========================================================================
   P10 Suscripciones — Estilos del modal y el corte de contenido
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
    --p10-red:     #c0392b;
    --p10-red-dk:  #a93226;
    --p10-green:   #27ae60;
    --p10-yellow:  #e67e22;
    --p10-gray:    #f4f4f4;
    --p10-border:  #e0e0e0;
    --p10-text:    #333;
    --p10-muted:   #777;
    --p10-radius:  10px;
    --p10-shadow:  0 8px 40px rgba(0,0,0,.22);
}

/* --------------------------------------------------------------------------
   Aviso de retorno (procesando pago)
   -------------------------------------------------------------------------- */
.p10-subs-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}
.p10-subs-notice-ok      { background: #eafaf1; border-left: 4px solid var(--p10-green); color: #1e8449; }
.p10-subs-notice-pending { background: #fef9e7; border-left: 4px solid var(--p10-yellow); color: #7d6608; }

/* --------------------------------------------------------------------------
   Corte de contenido (bloque "Ver más")
   -------------------------------------------------------------------------- */
.p10-subs-cut {
    position: relative;
    margin-top: -60px;
    padding-top: 60px;
}

.p10-subs-cut-fade {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}

.p10-subs-cut-cta {
    background: var(--p10-gray);
    border: 1px solid var(--p10-border);
    border-radius: var(--p10-radius);
    padding: 28px 24px;
    text-align: center;
    margin-top: 8px;
}

.p10-subs-cut-lead {
    font-size: 16px;
    color: var(--p10-text);
    margin: 0 0 16px;
}

.p10-subs-btn-vermore {
    display: inline-block;
    background: var(--p10-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .2px;
}
.p10-subs-btn-vermore:hover  { background: var(--p10-red-dk); }
.p10-subs-btn-vermore:active { transform: scale(.98); }

.p10-subs-cut-desde {
    font-size: 13px;
    color: var(--p10-muted);
    margin: 12px 0 0;
}

/* --------------------------------------------------------------------------
   Modal — overlay y caja
   -------------------------------------------------------------------------- */
.p10-subs-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.p10-subs-modal.p10-open {
    display: flex;
}

.p10-subs-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    cursor: pointer;
}

.p10-subs-box {
    position: relative;
    background: #fff;
    border-radius: var(--p10-radius);
    box-shadow: var(--p10-shadow);
    width: min(520px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 32px 24px;
    z-index: 1;
    animation: p10-modal-in .2s ease;
}

@keyframes p10-modal-in {
    from { opacity: 0; transform: scale(.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* Botón de cierre */
.p10-subs-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.p10-subs-close:hover { color: #333; background: #f0f0f0; }

/* --------------------------------------------------------------------------
   Header del modal
   -------------------------------------------------------------------------- */
.p10-subs-header {
    text-align: center;
    margin-bottom: 24px;
}
.p10-subs-header-icon { font-size: 40px; line-height: 1; display: block; margin-bottom: 10px; }
.p10-subs-header h2   { margin: 0 0 6px; font-size: 20px; color: #1a1a2e; }
.p10-subs-header p    { margin: 0; font-size: 14px; color: var(--p10-muted); }

/* --------------------------------------------------------------------------
   Pestañas (login / registro)
   -------------------------------------------------------------------------- */
.p10-subs-tabs {
    display: flex;
    border-bottom: 2px solid var(--p10-border);
    margin-bottom: 20px;
}
.p10-subs-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--p10-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
/* Pestaña activa: texto rojo, fondo blanco */
.p10-subs-tab.active {
    color: var(--p10-red);
    border-bottom-color: var(--p10-red);
}
/* Hover: texto blanco sobre fondo rojo (evita texto rojo sobre fondo rojo) */
.p10-subs-tab:hover {
    color: #fff;
    background: var(--p10-red);
    border-bottom-color: var(--p10-red);
}

/* --------------------------------------------------------------------------
   Campos de formulario
   -------------------------------------------------------------------------- */
.p10-subs-field {
    margin-bottom: 14px;
}
.p10-subs-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--p10-text);
    margin-bottom: 4px;
}
.p10-subs-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    background: #fafafa;
}
.p10-subs-field input:focus {
    outline: none;
    border-color: var(--p10-red);
    box-shadow: 0 0 0 3px rgba(192,57,43,.12);
    background: #fff;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.p10-subs-btn-primary {
    display: block;
    width: 100%;
    background: var(--p10-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background .2s;
    margin-top: 6px;
    text-decoration: none;
}
.p10-subs-btn-primary:hover { background: var(--p10-red-dk); }
.p10-subs-btn-primary:disabled { background: #bbb; cursor: not-allowed; }

.p10-subs-btn-back {
    background: none;
    border: none;
    color: var(--p10-red);
    font-size: 13px;
    cursor: pointer;
    display: block;
    margin: 10px auto 0;
    padding: 4px;
}
.p10-subs-btn-back:hover { text-decoration: underline; }

.p10-subs-hint { font-size: 12px; color: var(--p10-muted); margin: 8px 0 0; text-align: center; }
.p10-subs-hint a { color: var(--p10-red); }

/* --------------------------------------------------------------------------
   Error
   -------------------------------------------------------------------------- */
.p10-subs-error {
    background: #fff0f0;
    border-left: 4px solid #dc3232;
    color: #7a1e1e;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Planes
   -------------------------------------------------------------------------- */
.p10-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.p10-plan-card {
    border: 2px solid var(--p10-border);
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    position: relative;
    transition: border-color .2s, box-shadow .2s;
}
.p10-plan-card:hover { border-color: var(--p10-red); box-shadow: 0 2px 12px rgba(192,57,43,.12); }

.p10-plan-featured {
    border-color: var(--p10-red);
    box-shadow: 0 2px 16px rgba(192,57,43,.15);
}

.p10-plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--p10-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .5px;
}

.p10-plan-name  { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.p10-plan-price { font-size: 18px; font-weight: 700; color: var(--p10-red); }
.p10-plan-price span { font-size: 11px; font-weight: 400; color: var(--p10-muted); }
.p10-plan-usd   { font-size: 11px; color: var(--p10-muted); margin: 2px 0 12px; }

.p10-btn-plan {
    background: var(--p10-red);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background .2s;
}
.p10-btn-plan:hover { background: var(--p10-red-dk); }

.p10-plan-seleccionado {
    background: #f8f8f8;
    border: 1px solid var(--p10-border);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--p10-text);
    margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Loading
   -------------------------------------------------------------------------- */
.p10-subs-loading {
    text-align: center;
    color: var(--p10-muted);
    font-size: 14px;
    padding: 20px 0;
}
.p10-subs-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--p10-border);
    border-top-color: var(--p10-red);
    border-radius: 50%;
    animation: p10-spin .7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}
@keyframes p10-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Nota al pie del modal
   -------------------------------------------------------------------------- */
.p10-subs-footer-note {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--p10-border);
}

/* --------------------------------------------------------------------------
   Sección de perfil de usuario
   -------------------------------------------------------------------------- */
.p10-profile-subs { margin: 16px 0; }

.p10-profile-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}
.p10-badge-active { background: #eafaf1; color: #1e8449; }
.p10-badge-staff  { background: #e8f4fd; color: #1a5276; }
.p10-badge-none   { background: #f5f5f5; color: #888; }

.p10-profile-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.p10-profile-table th,
.p10-profile-table td { padding: 8px 10px; border-bottom: 1px solid var(--p10-border); text-align: left; }
.p10-profile-table th { color: var(--p10-muted); font-weight: 600; width: 140px; }

.p10-profile-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-right: 8px;
}
.p10-profile-btn-cancel { background: #fdf2f2; color: #c0392b; border: 1px solid #e8b4b0; }
.p10-profile-btn-cancel:hover { background: #fce4e4; }
.p10-profile-btn-renew  { background: var(--p10-red); color: #fff; border: none; }
.p10-profile-btn-renew:hover  { background: var(--p10-red-dk); color: #fff; }

.p10-profile-history { margin-top: 16px; }
.p10-profile-history summary { cursor: pointer; color: var(--p10-red); font-size: 13px; }

/* --------------------------------------------------------------------------
   Responsive (modal)
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
    .p10-subs-box    { padding: 24px 18px 20px; }
    .p10-plans-grid  { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Landing de suscripción — shortcode [p10_suscripcion]
   -------------------------------------------------------------------------- */
.p10-sub-landing {
    max-width: 700px;
    margin: 0 auto;
    padding: 48px 20px 32px;
    text-align: center;
    font-family: inherit;
}

.p10-sub-landing-icon {
    font-size: 54px;
    display: block;
    margin-bottom: 16px;
    line-height: 1;
}

.p10-sub-landing h2 {
    font-size: 28px;
    color: #1a1a2e;
    margin: 0 0 14px;
    line-height: 1.3;
}

.p10-sub-landing-lead {
    font-size: 16px;
    color: var(--p10-muted);
    margin: 0 0 32px;
    line-height: 1.7;
}

.p10-sub-landing-beneficios {
    list-style: none;
    padding: 20px 28px;
    margin: 0 0 36px;
    background: var(--p10-gray);
    border-radius: var(--p10-radius);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p10-sub-landing-beneficios li {
    font-size: 15px;
    color: var(--p10-text);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.p10-sub-landing-planes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 36px;
}

.p10-sub-landing-plan {
    border: 2px solid var(--p10-border);
    border-radius: 10px;
    padding: 20px 10px 16px;
    position: relative;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}

.p10-sub-landing-plan:hover {
    border-color: var(--p10-red);
    box-shadow: 0 3px 14px rgba(192,57,43,.13);
}

.p10-sub-landing-plan-featured {
    border-color: var(--p10-red);
    box-shadow: 0 3px 18px rgba(192,57,43,.16);
}

.p10-sub-landing-cta {
    margin-top: 4px;
}

.p10-sub-landing-btn {
    font-size: 18px !important;
    padding: 16px 52px !important;
}

.p10-sub-landing-nota {
    font-size: 12px;
    color: #bbb;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .p10-sub-landing-planes { grid-template-columns: 1fr 1fr; }
    .p10-sub-landing h2     { font-size: 22px; }
    .p10-sub-landing-btn    { font-size: 16px !important; padding: 14px 36px !important; }
}

@media (max-width: 380px) {
    .p10-sub-landing-planes { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Banner promocional al final de cada nota — .p10-banner-promo-subs
   -------------------------------------------------------------------------- */
.p10-banner-promo-subs {
    background: #F7EFE0;
    border-radius: 10px;
    padding: 40px 24px 36px;
    text-align: center;
    margin: 36px 0 8px;
    border: 1px solid #DDD0BE;
    position: relative;
    overflow: hidden;
    /* Separador sutil en la parte superior */
    box-shadow: 0 -1px 0 #e8dece, 0 4px 18px rgba(0,0,0,.06);
}


.p10-banner-promo-subs__logo {
    margin-top: 22px;
    margin-bottom: 0;
    line-height: 0;
}

/* Logo imagen: mix-blend-mode multiply hace que el fondo blanco
   desaparezca sobre el fondo crema del banner (#F7EFE0).
   El negro y el rojo del logo se mantienen correctamente. */
.p10-banner-promo-subs__logo-img {
    max-width: 110px;
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
    display: inline-block;
}

/* Fallback texto si WordPress no tiene logo configurado */
.p10-banner-promo-subs__logo-text {
    font-size: 34px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
    letter-spacing: -1px;
    font-family: inherit;
    display: inline-block;
}
.p10-banner-promo-subs__logo-text span {
    color: #c0392b;
}

.p10-banner-promo-subs__texto {
    font-size: 18px;
    color: #2c2c2c;
    margin: 0 auto 26px;
    max-width: 540px;
    line-height: 1.55;
    font-weight: 500;
}

.p10-banner-promo-subs__btn {
    display: inline-block;
    background: #c0392b;
    color: #fff !important;
    padding: 14px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.2px;
}
.p10-banner-promo-subs__btn:hover {
    background: #a93226;
    color: #fff !important;
    transform: translateY(-1px);
}
.p10-banner-promo-subs__btn:focus {
    outline: 3px solid rgba(192,57,43,.4);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 576px) {
    .p10-banner-promo-subs {
        padding: 32px 16px 28px;
        border-radius: 6px;
    }
    .p10-banner-promo-subs__logo  { font-size: 28px; }
    .p10-banner-promo-subs__texto { font-size: 16px; }
    .p10-banner-promo-subs__btn   { padding: 13px 30px; font-size: 15px; }
}
