/* =============================================================================
   BOY OR GIRL — PÁGINA PÚBLICA DEL PROGRAMA DE AFILIADAS (/affiliate-program/)
   -----------------------------------------------------------------------------
   Usa los tokens de bog-tokens.css (--bog-*). Todo va dentro de .bog-affp para
   no tocar el resto del sitio. Acento violeta (--bog-violet, 6.2:1 con blanco):
   la página es pública y no depende del tema de la usuaria.
   Móvil primero: CTA fija abajo y aviso (popup) tipo hoja inferior.
   ============================================================================= */

.bog-affp {
    --affp-acc: var(--bog-violet, #6A4BB8);
    --affp-acc-soft: #EEEAF8;
    --affp-ink: var(--bog-ink, #1B2340);
    --affp-muted: var(--bog-muted, #565D74);
    --affp-line: var(--bog-line, #E4DFEC);
    --affp-tint: var(--bog-tint, #F6F3F9);
    --affp-green: var(--bog-green, #0B7B5B);
    --affp-green-soft: var(--bog-green-soft, #E3F4EE);
    --affp-danger: var(--bog-danger, #B42318);
    --affp-danger-soft: var(--bog-danger-soft, #FEF0EF);
    --affp-r-sm: var(--bog-radius-sm, 12px);
    --affp-r: var(--bog-radius, 20px);
    --affp-r-lg: var(--bog-radius-lg, 28px);
    font-family: var(--bog-font-body, system-ui, sans-serif);
    color: var(--affp-ink);
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 0 96px;
}

@media (min-width: 1025px) {
    .bog-affp { padding-bottom: 48px; }
}

.bog-affp *,
.bog-affp *::before,
.bog-affp *::after { box-sizing: border-box; }

.bog-affp h1,
.bog-affp h2,
.bog-affp h3 {
    font-family: var(--bog-font-display, system-ui, sans-serif);
    font-weight: 700;
    color: var(--affp-ink);
    margin: 0;
    line-height: 1.15;
    letter-spacing: 0;
}

.bog-affp p { margin: 0; line-height: 1.55; }
.bog-affp ul, .bog-affp ol { margin: 0; }
.bog-affp a { color: var(--affp-acc); }
.bog-affp [hidden] { display: none !important; }

.affp-muted { color: var(--affp-muted); }
.affp-small { font-size: 13.5px; }
.affp-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.affp-crumbs { font-size: 13px; color: var(--affp-muted); margin: 4px 2px 12px; }
.affp-crumbs a { color: var(--affp-muted); }

/* ---------- Hero ---------- */
.affp-hero {
    background: radial-gradient(120% 140% at 100% 0%, #8B6FD6 0%, #6A4BB8 45%, #4E3596 100%);
    color: #fff;
    border-radius: var(--affp-r-lg);
    padding: 26px 22px;
    position: relative;
    overflow: hidden;
}
.affp-hero::after {
    content: ""; position: absolute; right: -60px; bottom: -60px;
    width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.bog-affp .affp-hero h1 {
    color: #fff;
    font-size: clamp(28px, 6vw, 42px);
    margin: 14px 0 10px;
    max-width: 640px;
}
.affp-hero h1 em { font-style: normal; color: #FDE68A; }
.affp-lead { font-size: 16px; max-width: 620px; opacity: .95; }
.affp-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.affp-trust { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px !important; }
.affp-trust li { background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 600; }

.affp-chip {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
    padding: 5px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.affp-chip--glass { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- Botones ---------- */
.affp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 999px; padding: 12px 20px; min-height: 46px;
    font: 700 15px var(--bog-font-body, system-ui, sans-serif);
    cursor: pointer; text-decoration: none !important; line-height: 1.2;
}
.affp-btn--white { background: #fff; color: var(--affp-acc) !important; }
.affp-btn--outline-w { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.affp-btn--primary { background: var(--affp-acc); color: #fff !important; }
.affp-btn--ghost { background: #fff; color: var(--affp-ink) !important; box-shadow: inset 0 0 0 1.5px var(--affp-line); }
.affp-btn:focus-visible,
.bog-affp button:focus-visible,
.bog-affp summary:focus-visible { outline: 3px solid #FCD34D; outline-offset: 2px; }

/* ---------- Tarjetas y rejilla ---------- */
.affp-card {
    background: var(--bog-paper, #fff);
    border: 1px solid var(--affp-line);
    border-radius: var(--affp-r);
    padding: 20px;
    margin-top: 14px;
}
.bog-affp .affp-card h2 { font-size: 22px; margin-bottom: 12px; }
.affp-h3 { font-size: 17px !important; margin: 18px 0 8px !important; }
.affp-grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 14px; }
.affp-grid-2 > .affp-card { margin-top: 0; }
.affp-grid-2--flat { margin-top: 0; }
@media (min-width: 760px) { .affp-grid-2 { grid-template-columns: 1fr 1fr; } }

.affp-steps { list-style: none; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .affp-steps { grid-template-columns: repeat(4, 1fr); } }
.affp-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--affp-tint); border-radius: var(--affp-r-sm); padding: 14px; }
.affp-steps strong { display: block; margin-bottom: 2px; }
.affp-steps__n {
    flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--affp-acc); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* calculadora */
.affp-calc-out { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px !important; }
.affp-calc-out strong { font: 800 40px var(--bog-font-display, system-ui, sans-serif); color: var(--affp-green); }
.bog-affp input[type=range] { width: 100%; accent-color: var(--affp-acc); height: 28px; }
.affp-calc-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--affp-muted); }
.affp-calc-note { background: var(--affp-tint); border-radius: var(--affp-r-sm); padding: 10px 12px; margin-top: 12px !important; }

/* video (se carga al tocar) */
.affp-video { border-radius: var(--affp-r-sm); overflow: hidden; aspect-ratio: 16 / 9; background: #2b2b40; }
.affp-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.affp-video__btn {
    position: relative; width: 100%; height: 100%; border: 0; cursor: pointer; color: #fff;
    background-color: #4E3596; background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
}
.affp-video__play { width: 66px; height: 46px; border-radius: 12px; background: #E11D48; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.affp-video__btn small { position: absolute; bottom: 10px; left: 12px; font-size: 12px; background: rgba(0, 0, 0, .45); padding: 2px 8px; border-radius: 999px; }

.affp-bar { height: 10px; border-radius: 99px; background: var(--affp-tint); overflow: hidden; margin: 6px 0 12px; }
.affp-bar span { display: block; height: 100%; background: var(--affp-acc); border-radius: 99px; }
.affp-row-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 14.5px; }

.affp-ticks { list-style: none; padding: 0; display: grid; gap: 8px; }
.affp-ticks li { display: flex; gap: 10px; align-items: flex-start; }
.affp-i { flex: 0 0 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.affp-i--ok { background: var(--affp-green-soft); color: var(--affp-green); }
.affp-i--no { background: var(--affp-danger-soft); color: var(--affp-danger); }

.affp-who { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.affp-who li { background: var(--affp-acc-soft); color: var(--affp-acc); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13.5px; }

/* ---------- Preguntas frecuentes ---------- */
.bog-affp .affp-section-title { font-size: 26px; margin: 30px 2px 4px; scroll-margin-top: 80px; }
.affp-section-sub { margin: 0 2px 4px !important; color: var(--affp-muted); }
.affp-faq-search {
    width: 100%; border: 1.5px solid var(--affp-line); border-radius: 999px; padding: 12px 16px;
    font: 15px var(--bog-font-body, system-ui, sans-serif); margin: 6px 0 10px; background: #fff; color: var(--affp-ink);
}
.affp-faq-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.affp-faq-tabs button {
    flex: 0 0 auto; border: 1.5px solid var(--affp-line); background: #fff; color: var(--affp-ink);
    border-radius: 999px; padding: 8px 14px; font: 600 14px var(--bog-font-body, system-ui, sans-serif); cursor: pointer;
}
.affp-faq-tabs button[aria-pressed="true"] { background: var(--affp-acc); border-color: var(--affp-acc); color: #fff; }
.affp-faq { background: #fff; border: 1px solid var(--affp-line); border-radius: var(--affp-r); overflow: hidden; }
.affp-faq details { border-top: 1px solid var(--affp-line); }
.affp-faq details:first-child,
.affp-faq details[hidden] + details { border-top: 0; }
.affp-faq summary {
    list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 700;
    position: relative; font-size: 15.5px; color: var(--affp-ink);
}
.affp-faq summary::-webkit-details-marker { display: none; }
.affp-faq summary::after {
    content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 50%; background: var(--affp-acc-soft); color: var(--affp-acc);
    display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800;
}
.affp-faq details[open] summary::after { content: "–"; }
.affp-faq__a { padding: 0 18px 16px; color: #2c334d; }

/* ---------- Solicitud ---------- */
.affp-apply { border: 2px solid var(--affp-acc); scroll-margin-top: 80px; }
.affp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.affp-field label { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--affp-muted); margin: 0; }
.bog-affp .affp-field .form-control,
.bog-affp .affp-field select,
.bog-affp .affp-field textarea {
    border: 1.5px solid var(--affp-line); border-radius: var(--affp-r-sm); padding: 12px 14px; height: auto;
    font: 15px var(--bog-font-body, system-ui, sans-serif); background: #fff; color: var(--affp-ink); width: 100%;
}
.bog-affp .affp-field .form-control:focus { outline: 0; border-color: var(--affp-acc); box-shadow: 0 0 0 3px var(--affp-acc-soft); }
.affp-help { font-size: 12.5px; color: var(--affp-muted); }
.affp-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 10px; font-size: 14.5px; }
.affp-check input { width: 20px; height: 20px; margin: 2px 0 0; position: static; accent-color: var(--affp-acc); flex: 0 0 20px; }
.affp-check label { margin: 0; }
.bog-affp .errorlist { list-style: none; padding: 0; margin: 2px 0 8px; color: var(--affp-danger); font-size: 13px; font-weight: 600; }
.affp-alert { background: var(--affp-danger-soft); border-radius: var(--affp-r-sm); padding: 10px 12px; margin-bottom: 12px; }
.affp-alert .errorlist { margin: 0; }

.affp-state { display: flex; gap: 14px; align-items: flex-start; }
.affp-state__ico { flex: 0 0 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.affp-state__ico--wait { background: #FEF3C7; color: var(--bog-amber-text, #8A5200); }
.affp-state__ico--ok { background: var(--affp-green-soft); color: var(--affp-green); }
.affp-state__ico--lock { background: var(--affp-acc-soft); color: var(--affp-acc); }
.affp-state__ico--no { background: var(--affp-danger-soft); color: var(--affp-danger); }
.bog-affp .affp-state h3 { font-size: 20px; margin-bottom: 4px; }

.affp-disclaimer { margin-top: 18px !important; font-size: 12.5px; color: var(--affp-muted); text-align: center; }

/* ---------- CTA fija (móvil) ----------
   Va justo ENCIMA del footer fijo del sitio (≤1024px, ~74px de alto; el JS
   ajusta la altura real) y por debajo del loader (z-index 1000) y del footer
   (999), para no taparlos. */
.affp-sticky {
    position: fixed; left: 0; right: 0; bottom: var(--affp-footer-h, 74px); z-index: 990;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--affp-line);
    display: flex; gap: 10px; align-items: center;
}
.affp-sticky { box-shadow: 0 -6px 18px rgba(27, 35, 64, .08); transition: transform .2s ease, opacity .2s ease; }
.affp-sticky--off { transform: translateY(120%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .affp-sticky { transition: none; } }
.affp-sticky p { flex: 1; font-size: 13px; line-height: 1.3; }
.affp-sticky strong { font-size: 15px; display: block; }
@media (min-width: 1025px) { .affp-sticky { display: none; } }

/* ---------- Aviso sin sesión ---------- */
.affp-modal {
    position: fixed; inset: 0; z-index: 1060; background: rgba(27, 35, 64, .55);
    display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 600px) { .affp-modal { align-items: center; padding: 20px; } }
.affp-sheet {
    background: #fff; width: 100%; max-width: 440px; position: relative;
    border-radius: 24px 24px 0 0; padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
    animation: affp-up .22s ease-out;
}
@media (min-width: 600px) { .affp-sheet { border-radius: 24px; } }
@media (prefers-reduced-motion: reduce) { .affp-sheet { animation: none; } }
@keyframes affp-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.affp-sheet__x { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--affp-tint); font-size: 18px; cursor: pointer; }
.affp-sheet__big { width: 60px; height: 60px; border-radius: 18px; background: var(--affp-acc-soft); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px; }
.bog-affp .affp-sheet h3 { font-size: 24px; margin-bottom: 6px; }
.affp-sheet ul { padding-left: 18px; margin: 10px 0 16px !important; color: #2c334d; }
.affp-sheet li { margin-bottom: 4px; }
.affp-stack { display: flex; flex-direction: column; gap: 10px; }
