/* BAP Frontend Member Portal v1.7.2 — Direct Payment Integration
 * Scoped to BAP portal components only. No global WordPress/Elementor/Astra overrides.
 */
.bap-fmp-shell {
    --bap-pay-navy:#071a3f;
    --bap-pay-navy-2:#0b275a;
    --bap-pay-blue:#1d63e9;
    --bap-pay-blue-2:#2c7cff;
    --bap-pay-gold:#f4bd14;
    --bap-pay-green:#20b657;
    --bap-pay-red:#ef4057;
    --bap-pay-white:#fff;
    --bap-pay-muted:#9fb0ce;
    --bap-pay-border:rgba(123,160,220,.24);
    --bap-pay-shadow:0 22px 60px rgba(0,0,0,.28);
}

.bap-fmp-payment-health,
.bap-fmp-product-selector,
.bap-fmp-progress-panel,
.bap-fmp-status-gate {
    box-sizing:border-box;
    width:100%;
    border:1px solid var(--bap-pay-border);
    border-radius:18px;
    color:var(--bap-pay-white);
}

.bap-fmp-payment-health {
    display:flex;
    align-items:center;
    gap:14px;
    padding:14px 16px;
    margin:0 0 18px;
    background:linear-gradient(135deg,rgba(8,33,76,.98),rgba(4,20,48,.98));
    box-shadow:0 12px 28px rgba(0,0,0,.17);
}
.bap-fmp-payment-health__icon {
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:12px;
    background:rgba(255,255,255,.08);
}
.bap-fmp-payment-health__icon svg {width:22px;height:22px;}
.bap-fmp-payment-health>div:nth-child(2){min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;}
.bap-fmp-payment-health strong{font-size:14px;letter-spacing:.01em;}
.bap-fmp-payment-health span{font-size:12px;color:var(--bap-pay-muted);}
.bap-fmp-payment-health em,
.bap-fmp-source-chip {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:5px 10px;
    border-radius:999px;
    font-style:normal;
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
    white-space:nowrap;
}
.bap-fmp-payment-health.is-connected em{background:rgba(32,182,87,.14);border:1px solid rgba(32,182,87,.5);color:#71eda1;}
.bap-fmp-payment-health.is-waiting em{background:rgba(244,189,20,.12);border:1px solid rgba(244,189,20,.42);color:#ffd85b;}

.bap-fmp-status-gate {
    position:relative;
    overflow:hidden;
    padding:22px;
    margin-bottom:18px;
    background:linear-gradient(145deg,rgba(7,27,65,.98),rgba(5,17,42,.98));
    box-shadow:var(--bap-pay-shadow);
}
.bap-fmp-status-gate:before{
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:4px;
    background:var(--bap-pay-blue);
}
.bap-fmp-status-gate.is-warning:before{background:var(--bap-pay-gold);}
.bap-fmp-status-gate.is-danger:before{background:var(--bap-pay-red);}
.bap-fmp-status-gate__head{display:flex;gap:20px;justify-content:space-between;align-items:flex-start;}
.bap-fmp-status-gate h2{margin:4px 0 7px;color:#fff;font-size:25px;line-height:1.15;}
.bap-fmp-status-gate p{max-width:780px;margin:0;color:var(--bap-pay-muted);font-size:13px;line-height:1.65;}
.bap-fmp-kicker{display:block;color:var(--bap-pay-gold);font-size:10px;font-weight:900;letter-spacing:.14em;}

.bap-fmp-product-selector {
    padding:22px;
    margin:0 0 18px;
    background:linear-gradient(145deg,#0b285e,#061a3e 64%,#05132f);
    box-shadow:var(--bap-pay-shadow);
}
.bap-fmp-product-selector.is-featured{border-color:rgba(244,189,20,.55);}
.bap-fmp-product-selector__head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px;}
.bap-fmp-product-selector__head h2{margin:4px 0 6px;color:#fff;font-size:26px;line-height:1.15;}
.bap-fmp-product-selector__head p{margin:0;color:var(--bap-pay-muted);font-size:13px;}
.bap-fmp-source-chip{background:rgba(244,189,20,.11);border:1px solid rgba(244,189,20,.38);color:#ffd85c;}
.bap-fmp-product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.bap-fmp-product-card{
    position:relative;
    display:flex;
    flex-direction:column;
    min-height:182px;
    padding:18px 16px 14px;
    border:1px solid rgba(123,160,220,.3);
    border-radius:14px;
    background:linear-gradient(145deg,rgba(31,66,126,.9),rgba(18,44,91,.92));
    cursor:pointer;
    transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.bap-fmp-product-card:hover{transform:translateY(-2px);border-color:rgba(244,189,20,.62);box-shadow:0 12px 26px rgba(0,0,0,.2);}
.bap-fmp-product-card input{position:absolute;opacity:0;pointer-events:none;}
.bap-fmp-product-radio{position:absolute;top:14px;right:14px;width:17px;height:17px;border-radius:50%;border:2px solid rgba(255,255,255,.65);box-shadow:inset 0 0 0 3px transparent;}
.bap-fmp-product-card input:checked~.bap-fmp-product-radio{border-color:#fff;background:var(--bap-pay-gold);box-shadow:inset 0 0 0 3px #0c2a60;}
.bap-fmp-product-card:has(input:checked){border-color:var(--bap-pay-gold);background:linear-gradient(145deg,rgba(34,72,137,.98),rgba(21,51,104,.98));box-shadow:0 0 0 1px rgba(244,189,20,.12),0 16px 30px rgba(0,0,0,.22);}
.bap-fmp-product-card strong{padding-right:26px;color:#ffe048;font-size:14px;line-height:1.3;}
.bap-fmp-product-card b{display:block;margin:12px 0 5px;color:#fff;font-size:25px;line-height:1;font-weight:900;}
.bap-fmp-product-card small{color:#dbe6fa;font-size:11px;font-weight:700;}
.bap-fmp-product-card p{margin:10px 0 0;color:#b9c9e3;font-size:11px;line-height:1.45;}
.bap-fmp-product-card em{margin-top:auto;padding-top:10px;color:#7795c5;font-size:9px;font-style:normal;letter-spacing:.05em;}
.bap-fmp-product-selector__footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:16px;padding-top:16px;border-top:1px solid rgba(123,160,220,.2);}
.bap-fmp-product-selector__footer span{max-width:650px;color:#8fa5c7;font-size:11px;line-height:1.45;}
.bap-fmp-btn-success{background:linear-gradient(180deg,#27bc5c,#159443)!important;color:#fff!important;border-color:#32c868!important;min-width:220px;text-align:center;}
.bap-fmp-btn-success:hover{filter:brightness(1.06);}

.bap-fmp-payment-order-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0 16px;}
.bap-fmp-payment-metric{padding:13px 14px;border:1px solid rgba(123,160,220,.18);border-radius:12px;background:rgba(4,18,45,.52);}
.bap-fmp-payment-metric span{display:block;margin-bottom:5px;color:#8ea4c8;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:800;}
.bap-fmp-payment-metric strong{display:block;color:#fff;font-size:13px;overflow-wrap:anywhere;}
.bap-fmp-pay-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.03em;white-space:nowrap;}
.bap-fmp-pay-badge.is-green{color:#7cf0a8;background:rgba(32,182,87,.13);border:1px solid rgba(32,182,87,.38);}
.bap-fmp-pay-badge.is-blue{color:#8db7ff;background:rgba(29,99,233,.15);border:1px solid rgba(64,127,238,.42);}
.bap-fmp-pay-badge.is-gold{color:#ffdd61;background:rgba(244,189,20,.12);border:1px solid rgba(244,189,20,.36);}
.bap-fmp-pay-badge.is-red{color:#ff9aa7;background:rgba(239,64,87,.13);border:1px solid rgba(239,64,87,.38);}
.bap-fmp-payment-actions{display:flex;gap:10px;flex-wrap:wrap;}

.bap-fmp-payment-table-wrap{overflow:auto;border:1px solid rgba(123,160,220,.18);border-radius:12px;}
.bap-fmp-payment-table{width:100%;border-collapse:collapse;min-width:760px;}
.bap-fmp-payment-table th,.bap-fmp-payment-table td{padding:12px 13px;text-align:left;border-bottom:1px solid rgba(123,160,220,.13);font-size:12px;vertical-align:middle;}
.bap-fmp-payment-table th{color:#8fa7cd;background:rgba(4,18,45,.6);font-size:9px;text-transform:uppercase;letter-spacing:.08em;}
.bap-fmp-payment-table td{color:#e8effb;}
.bap-fmp-payment-table td small{display:block;margin-top:3px;color:#758daf;font-size:9px;}
.bap-fmp-payment-table tr:last-child td{border-bottom:0;}
.bap-fmp-payment-row-link{color:#79a9ff;font-weight:800;text-decoration:none;}
.bap-fmp-payment-row-link:hover{color:#fff;}

.bap-fmp-progress-panel{padding:20px;margin:18px 0;background:linear-gradient(145deg,rgba(7,29,68,.96),rgba(4,18,43,.96));box-shadow:0 14px 36px rgba(0,0,0,.18);}
.bap-fmp-progress-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;}
.bap-fmp-progress-step{display:flex;align-items:center;gap:9px;min-height:68px;padding:10px;border:1px solid rgba(123,160,220,.16);border-radius:11px;background:rgba(7,24,56,.62);}
.bap-fmp-progress-step i{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;border-radius:50%;background:rgba(255,255,255,.08);color:#9fb0ce;font-size:10px;font-style:normal;font-weight:900;}
.bap-fmp-progress-step div{min-width:0;display:flex;flex-direction:column;gap:3px;}
.bap-fmp-progress-step strong{color:#d9e3f6;font-size:10px;line-height:1.25;}
.bap-fmp-progress-step span{color:#6f86a9;font-size:9px;}
.bap-fmp-progress-step.is-complete{border-color:rgba(32,182,87,.24);background:rgba(17,77,51,.15);}
.bap-fmp-progress-step.is-complete i{background:rgba(32,182,87,.2);color:#7cf0a8;}
.bap-fmp-progress-step.is-current{border-color:rgba(244,189,20,.58);box-shadow:inset 0 0 0 1px rgba(244,189,20,.1);}
.bap-fmp-progress-step.is-current i{background:rgba(244,189,20,.2);color:#ffda54;}

.bap-fmp-payment-unavailable p{color:#9eb0ce;line-height:1.65;}

@media (max-width:1100px){
    .bap-fmp-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .bap-fmp-progress-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
    .bap-fmp-payment-order-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:720px){
    .bap-fmp-payment-health{align-items:flex-start;flex-wrap:wrap;}
    .bap-fmp-payment-health em{margin-left:56px;}
    .bap-fmp-status-gate__head,.bap-fmp-product-selector__head,.bap-fmp-product-selector__footer{flex-direction:column;align-items:stretch;}
    .bap-fmp-product-grid,.bap-fmp-payment-order-grid,.bap-fmp-progress-grid{grid-template-columns:1fr;}
    .bap-fmp-btn-success{width:100%;min-width:0;}
}

/* Pending membership package modal — visually aligned with the existing BAP popup,
 * but every displayed product value is provided by BAP Direct Payment System. */
.bap-fmp-product-modal{position:fixed;inset:0;z-index:999990;display:grid;place-items:center;padding:24px;}
.bap-fmp-product-modal[hidden]{display:none!important;}
.bap-fmp-product-modal__backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(0,8,24,.78);backdrop-filter:blur(3px);cursor:default;}
.bap-fmp-product-modal__dialog{position:relative;z-index:1;width:min(880px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;border:1px solid rgba(244,189,20,.7);border-radius:19px;background:#071a3f;box-shadow:0 32px 90px rgba(0,0,0,.52);}
.bap-fmp-product-modal__dialog .bap-fmp-product-selector{margin:0;border:0;border-radius:18px;box-shadow:none;padding:24px 22px 20px;}
.bap-fmp-product-modal__close{position:absolute;z-index:5;top:12px;right:12px;display:grid;place-items:center;width:42px;height:30px;padding:0;border:0;border-radius:999px;background:#ef4556;color:#fff;font-size:21px;font-weight:900;line-height:1;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.22);}
.bap-fmp-product-modal__close:hover{background:#ff5667;}
body.bap-fmp-payment-modal-open{overflow:hidden!important;}
@media(max-width:720px){.bap-fmp-product-modal{padding:10px}.bap-fmp-product-modal__dialog{width:calc(100vw - 20px);max-height:calc(100vh - 20px)}.bap-fmp-product-modal__dialog .bap-fmp-product-selector{padding:20px 14px 16px}.bap-fmp-product-modal__close{top:9px;right:9px}}

/* v1.7.1 — retained membership selector from the established BAP payment flow.
 * Values remain live from BAP Direct Payment System; this is presentation only. */
.bap-fmp-product-modal__dialog{width:min(660px,calc(100vw - 32px));border-radius:16px;background:#071a3f;}
.bap-fmp-product-selector--legacy{padding:20px!important;margin:0;background:#071a3f;border:0!important;border-radius:15px!important;}
.bap-fmp-product-selector--legacy .bap-fmp-product-selector__head{display:block;margin:0 0 16px;padding-right:48px;}
.bap-fmp-product-selector--legacy .bap-fmp-product-selector__head h2{margin:0 0 5px;color:#ffd400;font-size:25px;font-weight:900;line-height:1.1;}
.bap-fmp-product-selector--legacy .bap-fmp-product-selector__head p{margin:0;color:#fff;font-size:14px;line-height:1.45;}
.bap-fmp-product-selector--legacy .bap-fmp-product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card{min-height:137px;padding:13px 12px 12px;border:1px solid rgba(255,255,255,.17);border-radius:11px;background:#20385f;box-shadow:none;transform:none;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card:hover{transform:none;border-color:rgba(255,212,0,.72);box-shadow:none;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card input{position:absolute;opacity:0;pointer-events:none;}
.bap-fmp-product-selector--legacy .bap-fmp-product-radio{position:static;display:block;width:9px;height:9px;margin:0 0 9px;border:0;border-radius:50%;background:#fff;box-shadow:none;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card input:checked~.bap-fmp-product-radio{background:#ffd400;box-shadow:0 0 0 4px rgba(255,212,0,.16);}
.bap-fmp-product-selector--legacy .bap-fmp-product-card:has(input:checked){border-color:#ffd400;background:#20385f;box-shadow:0 0 0 1px rgba(255,212,0,.22) inset;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card strong{padding:0;color:#ffd400;font-size:15px;font-weight:900;line-height:1.25;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card b{margin:9px 0 7px;color:#fff;font-size:21px;font-weight:900;line-height:1;}
.bap-fmp-product-selector--legacy .bap-fmp-product-copy{margin-top:auto;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card small{display:block;color:#fff;font-size:11px;font-weight:800;line-height:1.35;}
.bap-fmp-product-selector--legacy .bap-fmp-product-card p{margin:2px 0 0;color:#fff;font-size:11px;line-height:1.35;}
.bap-fmp-product-selector__footer--legacy{display:block;margin-top:14px;padding:0;border:0;}
.bap-fmp-product-selector__footer--legacy .bap-fmp-btn-success{display:block;width:100%;min-width:0;margin:0;padding:11px 16px;border:0!important;border-radius:6px;background:#29ae4c!important;color:#fff!important;font-size:13px;font-weight:900;text-align:center;text-transform:uppercase;}
.bap-fmp-product-selector__footer--legacy .bap-fmp-btn-success:hover{background:#249843!important;filter:none;}
@media(max-width:720px){
    .bap-fmp-product-modal__dialog{width:calc(100vw - 20px);}
    .bap-fmp-product-selector--legacy .bap-fmp-product-grid{grid-template-columns:1fr;}
    .bap-fmp-product-selector--legacy .bap-fmp-product-selector__head{padding-right:40px;}
}


/* v1.7.2 — restore the established status-color banner language from the
 * legacy membership portal while keeping all data/logic in the new plugins. */
.bap-fmp-status-gate{
    padding:24px 28px;
    border:1px solid rgba(255,255,255,.18)!important;
    border-radius:14px;
    box-shadow:0 10px 28px rgba(0,0,0,.28);
    color:#fff;
}
.bap-fmp-status-gate:before{display:none!important;}
.bap-fmp-status-gate.status-pending_payment{background:linear-gradient(135deg,#fd7e14,#ff9f1a);}
.bap-fmp-status-gate.status-payment_verification{background:linear-gradient(135deg,#0dcaf0,#087990);}
.bap-fmp-status-gate.status-pending_review,
.bap-fmp-status-gate.status-pending_membership_approval{background:linear-gradient(135deg,#ffc107,#d39e00);}
.bap-fmp-status-gate.status-active{background:linear-gradient(135deg,#28a745,#145c2a);}
.bap-fmp-status-gate.status-expired{background:linear-gradient(135deg,#fd7e14,#a84d00);}
.bap-fmp-status-gate.status-suspended{background:linear-gradient(135deg,#dc3545,#7a0010);}
.bap-fmp-status-gate.status-preventive_suspension{background:linear-gradient(135deg,#0d6efd,#0038A8);}
.bap-fmp-status-gate.status-expulsion{background:linear-gradient(135deg,#111,#000);}
.bap-fmp-status-gate .bap-fmp-kicker{display:none;}
.bap-fmp-status-gate h2{margin:0 0 8px;color:#fff!important;font-size:30px;font-weight:900;text-transform:uppercase;}
.bap-fmp-status-gate p{margin:0;color:#fff!important;font-weight:600;line-height:1.5;}
.bap-fmp-status-gate .bap-fmp-status-badge{background:rgba(3,25,61,.32);border-color:rgba(255,255,255,.35);color:#fff;box-shadow:none;}

/* The old payment proof panel was a true popup above the Membership Portal.
 * Restore that behavior, while its content is now rendered by BAP Payments. */
.bap-fmp-checkout-modal{position:fixed;inset:0;z-index:999995;display:grid;place-items:center;padding:18px;}
.bap-fmp-checkout-modal[hidden]{display:none!important;}
.bap-fmp-checkout-modal__backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(0,8,24,.82);backdrop-filter:blur(2px);cursor:default;}
.bap-fmp-checkout-modal__dialog{position:relative;z-index:1;width:min(880px,calc(100vw - 30px));max-height:calc(100vh - 32px);overflow:auto;border:0;border-radius:15px;background:transparent;box-shadow:0 24px 80px rgba(0,0,0,.56);}
.bap-fmp-checkout-modal__close{position:absolute;z-index:20;top:9px;right:10px;display:grid;place-items:center;width:44px;height:31px;border:0;border-radius:999px;background:#ef4556;color:#fff;font-size:21px;font-weight:900;cursor:pointer;box-shadow:0 5px 16px rgba(0,0,0,.28);}
.bap-fmp-checkout-modal__dialog .bap-dps-wrap{max-width:none!important;margin:0!important;padding:0!important;}
.bap-fmp-checkout-modal__dialog .bap-dps-legacy-payment-modal{border-radius:15px;}
body.bap-fmp-payment-checkout-open{overflow:hidden!important;}
@media(max-width:760px){
    .bap-fmp-status-gate{padding:20px 18px;}
    .bap-fmp-status-gate h2{font-size:24px;}
    .bap-fmp-checkout-modal{padding:8px;}
    .bap-fmp-checkout-modal__dialog{width:calc(100vw - 16px);max-height:calc(100vh - 16px);}
}
