/* =====================================================================
   Balance Assurance popups — shared overlay + five popup designs
   (design-only components; open/close via .is-open on the overlay)
   ===================================================================== */

/* ---- Shared overlay / card shell ---- */
.yd-pop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10500;
    background: rgba(15, 25, 22, 0.55);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    padding: 30px 16px;
}
.yd-pop-overlay.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.yd-pop {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
    padding: 34px 34px 30px;
    margin: auto 0;
    animation: yd-pop-in 0.25s ease;
    font-size: 15px;
    color: #33414a;
}
@keyframes yd-pop-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
.yd-pop-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f1f4f3;
    color: #5d6b72;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    z-index: 2;
}
.yd-pop-close:hover {
    background: #e5eae8;
    transform: rotate(90deg);
}
.yd-pop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    background: #157f3d;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}
.yd-pop-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff;
}

/* =====================================================================
   1. What is Balance Assurance?  (.bap-)
   ===================================================================== */
.bap-pop { max-width: 560px; text-align: center; }
.bap-hero-icon { margin: 6px auto 18px; width: 150px; }
.bap-hero-icon svg { width: 150px; height: 120px; display: block; margin: 0 auto; }
.bap-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    color: #16232b;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
}
.bap-title::after {
    content: "";
    display: block;
    width: 120px;
    height: 3px;
    background: #157f3d;
    margin: 16px auto 0;
    border-radius: 2px;
}
.bap-intro {
    font-size: 17px;
    line-height: 1.5;
    color: #33414a;
    margin: 0 auto 22px;
    max-width: 440px;
}
.bap-intro b { color: #157f3d; }
.bap-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    text-align: left;
    padding: 18px 0;
    border-top: 1px solid #eef1f0;
}
.bap-row:first-of-type { border-top: none; }
.bap-row-icon {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e7f2ea;
    color: #157f3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}
.bap-row-text {
    font-size: 15.5px;
    line-height: 1.55;
    color: #2c3a42;
    margin: 0;
    align-self: center;
}
.bap-pop .yd-pop-btn { margin-top: 16px; }

/* =====================================================================
   2. YooDrive is new. The instructors are not.  (.ydn-)
   ===================================================================== */
.ydn-pop { max-width: 520px; text-align: center; }
.ydn-hero-icon { margin: 0 auto 8px; }
.ydn-hero-icon svg { width: 74px; height: 84px; }
.ydn-tagline {
    color: #d50032;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px;
}
.ydn-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    color: #16232b;
    letter-spacing: -0.5px;
    margin: 0 0 10px;
}
.ydn-sub {
    font-size: 15px;
    color: #4d5e64;
    line-height: 1.5;
    margin: 0 auto 20px;
    max-width: 380px;
}
.ydn-benefit {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    border: 1px solid #e7ecea;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fff;
}
.ydn-benefit-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
}
.ydn-benefit-icon.is-green { color: #157f3d; }
.ydn-benefit-icon.is-blue  { color: #0b6fb9; }
.ydn-benefit-icon.is-red   { color: #d50032; }
.ydn-benefit-title {
    font-size: 16px;
    font-weight: 800;
    color: #16232b;
    margin: 0 0 3px;
}
.ydn-benefit-text {
    font-size: 14px;
    color: #4d5e64;
    line-height: 1.45;
    margin: 0;
}
a.ydn-benefit-link { text-decoration: none; display: block; color: inherit; }
a.ydn-benefit-link .ydn-benefit { cursor: pointer; transition: 0.2s ease; }
a.ydn-benefit-link .ydn-benefit:hover { border-color: #157f3d; box-shadow: 0 4px 14px rgba(21, 127, 61, 0.12); }
.ydn-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    background: #f2f6f3;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    font-size: 13.5px;
    color: #3c4a50;
    line-height: 1.45;
}
.ydn-note i { color: #157f3d; font-size: 18px; margin-top: 2px; }
.ydn-note p { margin: 0; }
.ydn-protect {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    background: #e9f4ec;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}
.ydn-protect i { color: #157f3d; font-size: 26px; margin-top: 3px; }
.ydn-protect-title {
    font-size: 15px;
    font-weight: 800;
    color: #16232b;
    margin: 0 0 4px;
}
.ydn-protect-text {
    font-size: 13.5px;
    color: #3c4a50;
    line-height: 1.5;
    margin: 0;
}
.ydn-footer {
    margin: 16px 0 0;
    font-size: 14.5px;
    color: #16232b;
}
.ydn-footer b { font-weight: 700; }
.ydn-footer a { color: #0b6fb9; font-weight: 700; text-decoration: underline; }

/* =====================================================================
   Shared "warning header" bits for the red popups  (.rp-)
   ===================================================================== */
.rp-warning-circle {
    flex-shrink: 0;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #fdebee;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rp-warning-circle svg { width: 58px; height: 54px; }
.rp-suggested-title {
    font-size: 17px;
    font-weight: 800;
    color: #16232b;
    margin: 0 0 10px;
}
.rp-copy-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 1px solid #dfe6e2;
    border-radius: 10px;
    background: #fff;
    color: #157f3d;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}
.rp-copy-btn:hover { background: #eef7f0; }

/* =====================================================================
   3. School: student has £0 balance — do not link  (.snb-)
   ===================================================================== */
.snb-pop { max-width: 620px; }
.snb-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 20px;
    padding-right: 40px;
}
.snb-title {
    font-size: 27px;
    font-weight: 800;
    line-height: 1.25;
    color: #16232b;
    letter-spacing: -0.4px;
    margin: 0 0 4px;
}
.snb-title .is-amount { color: #d50032; }
.snb-warntext {
    color: #d50032;
    font-size: 16.5px;
    font-weight: 700;
    margin: 0;
}
.snb-benefits {
    border: 1px solid #f3d9de;
    border-radius: 16px;
    padding: 6px 20px;
    margin-bottom: 18px;
}
.snb-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 16px 0;
    border-top: 1px solid #f3e2e5;
}
.snb-row:first-child { border-top: none; }
.snb-row-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.snb-row-icon.is-red   { background: #fdebee; color: #d50032; }
.snb-row-icon.is-green { background: #e7f2ea; color: #157f3d; }
.snb-row-icon.is-blue  { background: #e8f1fa; color: #0b6fb9; }
.snb-row-title { font-size: 17px; font-weight: 800; margin: 0 0 4px; }
.snb-row-title.is-red   { color: #d50032; }
.snb-row-title.is-green { color: #157f3d; }
.snb-row-title.is-blue  { color: #0b6fb9; }
.snb-row-text {
    font-size: 14.5px;
    color: #3c4a50;
    line-height: 1.5;
    margin: 0;
}
.snb-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fdecee;
    border: 1px solid #f6cdd5;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
}
.snb-alert-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #d50032;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.snb-alert p {
    font-size: 15.5px;
    font-weight: 700;
    color: #16232b;
    line-height: 1.45;
    margin: 0;
}
.snb-reply-box {
    border: 1px solid #e7ecea;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.snb-reply-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid #bfe0c8;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
}
.snb-reply-inner > i { color: #157f3d; font-size: 20px; margin-top: 3px; }
.snb-reply-text {
    flex: 1;
    font-size: 14.5px;
    color: #2c3a42;
    line-height: 1.55;
    margin: 0;
}
.snb-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #d50032;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 -10px -8px;
}
.snb-footer i { font-size: 17px; }

/* =====================================================================
   4. Pupil: your balance is £0  (.pnb-)
   ===================================================================== */
.pnb-pop { max-width: 480px; }
.pnb-hero { text-align: center; margin-bottom: 6px; }
.pnb-hero-icon {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #e7f2ea;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pnb-hero-icon i { font-size: 38px; color: #157f3d; }
.pnb-hero-icon .pnb-amount-chip {
    position: absolute;
    right: -4px;
    bottom: 8px;
    background: #157f3d;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    border-radius: 999px;
    padding: 3px 9px;
    border: 2px solid #fff;
}
.pnb-title {
    font-size: 26px;
    font-weight: 800;
    color: #16232b;
    letter-spacing: -0.4px;
    margin: 0 0 16px;
    text-align: center;
}
.pnb-title .is-amount { color: #d50032; }
.pnb-panel {
    background: #eef6ef;
    border-radius: 16px;
    padding: 6px 18px;
    margin-bottom: 14px;
}
.pnb-panel-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 15px 0;
    border-top: 1px solid #ddebe0;
}
.pnb-panel-row:first-child { border-top: none; }
.pnb-panel-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: #157f3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.pnb-panel-text {
    font-size: 14.5px;
    color: #2c3a42;
    line-height: 1.55;
    margin: 0;
    align-self: center;
}
.pnb-panel-text b.is-green { color: #157f3d; }
.pnb-panel-text b.is-red   { color: #d50032; }
.pnb-share {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fdecee;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.pnb-share-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: #d50032;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.pnb-share-title { font-size: 15.5px; font-weight: 800; color: #16232b; margin: 0 0 4px; }
.pnb-share-text {
    font-size: 14px;
    color: #3c4a50;
    line-height: 1.5;
    margin: 0;
}
.pnb-share-text b { color: #d50032; }
.pnb-know {
    background: #f2f4f3;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 18px;
}
.pnb-know-title { font-size: 16px; font-weight: 800; color: #16232b; margin: 0 0 10px; }
.pnb-know-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
    border-top: 1px solid #e2e6e4;
    font-size: 14px;
    color: #2c3a42;
    line-height: 1.5;
}
.pnb-know-row:first-of-type { border-top: none; }
.pnb-know-row i { color: #157f3d; font-size: 19px; margin-top: 2px; width: 24px; text-align: center; }
.pnb-know-row p { margin: 0; }
.pnb-know-row b.is-green { color: #157f3d; }
.pnb-continue {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 15.5px;
    font-weight: 700;
    color: #157f3d;
    cursor: pointer;
    text-decoration: none;
}
.pnb-continue:hover { color: #0e5c2b; text-decoration: underline; }

/* =====================================================================
   5. Instructor: student has £0 balance — do not confirm  (.inb-)
   ===================================================================== */
.inb-pop { max-width: 500px; }
.inb-hero { text-align: center; margin-bottom: 8px; }
.inb-hero .rp-warning-circle { margin: 0 auto 12px; width: 96px; height: 96px; }
.inb-title {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.3;
    color: #16232b;
    letter-spacing: -0.4px;
    text-align: center;
    margin: 0 0 16px;
}
.inb-title .is-red { color: #d50032; }
.inb-panel {
    background: #fdeef1;
    border-radius: 16px;
    padding: 6px 18px;
    margin-bottom: 14px;
}
.inb-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #f5d8dd;
}
.inb-row:first-child { border-top: none; }
.inb-row-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: #d50032;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.inb-row-title { font-size: 15.5px; font-weight: 800; color: #d50032; margin: 0 0 3px; }
.inb-row-text {
    font-size: 14px;
    color: #3c4a50;
    line-height: 1.5;
    margin: 0;
}
.inb-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fbdfe5;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.inb-alert-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: #d50032;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.inb-alert-title { font-size: 15.5px; font-weight: 800; color: #d50032; margin: 0 0 3px; }
.inb-alert-text {
    font-size: 14px;
    color: #16232b;
    line-height: 1.5;
    margin: 0;
}
.inb-reply {
    position: relative;
    background: #fbf3dc;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.inb-reply .rp-copy-btn { position: absolute; top: 14px; right: 14px; }
.inb-reply-quote {
    display: flex;
    gap: 12px;
    font-size: 14.5px;
    color: #2c3a42;
    line-height: 1.55;
}
.inb-reply-quote .quote-mark {
    color: #e4c35a;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    font-family: Georgia, serif;
}
.inb-reply-quote p { margin: 0; }
.inb-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f2f4f3;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 14.5px;
    color: #16232b;
    line-height: 1.5;
}
.inb-footer-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #d50032;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.inb-footer p { margin: 0; }
.inb-footer b { color: #d50032; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .yd-pop { padding: 26px 18px 22px; border-radius: 18px; }
    .bap-title { font-size: 26px; }
    .ydn-title { font-size: 24px; }
    .snb-header { flex-direction: column; text-align: center; align-items: center; padding-right: 0; gap: 14px; }
    .snb-title { font-size: 22px; }
    .snb-footer { font-size: 13px; margin: 0; text-align: center; }
    .pnb-title, .inb-title { font-size: 21px; }
}
