/* ============================================================
   Patronus Upsell Popup — upsell-popup.css v3
   Pixel-matched to approved design
   ============================================================ */
.patronus-upsell-modal,
.patronus-upsell-modal * {
    font-family: 'PT Sans', sans-serif;
}

body.pu-open { overflow: hidden; }

/* ── Overlay ────────────────────────────────────────────────── */
.patronus-upsell-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    transition: background .3s ease, backdrop-filter .3s ease;
}
.patronus-upsell-overlay.pu-visible {
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
}

/* ── Modal ──────────────────────────────────────────────────── */
.patronus-upsell-modal {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 860px;
    max-height: 92vh;
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
    transform: scale(0.94) translateY(12px);
    opacity: 0;
    transition: transform .32s cubic-bezier(.34,1.2,.64,1), opacity .28s ease;
}
.patronus-upsell-overlay.pu-visible .patronus-upsell-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ── Left panel ─────────────────────────────────────────────── */
.patronus-upsell-left {
    flex: 0 0 43%;
    overflow: hidden;
    background: #0a6e8e;
    min-height: 460px;
}
.pu-left-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* ── Right panel ────────────────────────────────────────────── */
.patronus-upsell-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px 20px 16px 20px;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

/* ── Close ──────────────────────────────────────────────────── */
.pu-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .15s, color .15s;
    z-index: 10;
    padding: 0;
}
.pu-close:hover,.pu-close:active,.pu-close:focus { background: #d1d5db !important; color: #111; }

/* ── FIX 1: Headline — one line, no wrapping ────────────────── */
.pu-header { padding-right: 32px; }
.pu-header h2 {
    font-size: 28px;
    font-weight: 900;
    font-style: italic;
    margin: 0 0 3px;
    line-height: 1.2;
    color: #111827;
    white-space: nowrap;   /* prevents wrapping to second line */
}
.pu-header h2 em {
    font-style: italic;
    color: #0e8eb4;
}
.pu-header p {
    font-size: 18px;
    color: #1f2937;
    margin: 0;
    font-weight: 400;
}

/* ── FIX 2: Social proof — blue bg + blue text ──────────────── */
.pu-social-proof {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #E9FAFF;     /* blue-200 */
    border-radius: 10px;
    padding: 10px 12px;
}
.pu-sp-icon { width: 28px; height: 28px; flex-shrink: 0; margin-top: 1px; }
.pu-social-proof p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #0E8EB4;          /* blue text */
}
.pu-social-proof p strong { color: #0e8eb4; }

/* ── Bundle items box ───────────────────────────────────────── */
.pu-bundle-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
}
.pu-bundle-img-wrap { flex: 0 0 88px; }
.pu-bundle-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}
.pu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.pu-items li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: #1f2937;
}
.pu-items li .pu-check { width: 15px; height: 15px; flex-shrink: 0; }
.pu-items li span:not(.pu-check):not(.pu-qty) { flex: 1; }

/* FIX 3: Quantity badge — blue ─────────────────────────────── */
.pu-qty {
    background: #E9FAFF;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    color: #0E8EB4;
    white-space: nowrap;
}

/* ── Price + shipping fused block ───────────────────────────── */
.pu-price-shipping { border-radius: 12px; overflow: clip; }

.pu-price-box {
    background: #0e8eb4;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pu-price-label {
    font-size: 18px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
}
.pu-price-now {
    font-size: 25px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin-left: auto;
}
.pu-price-was {
    font-size: 13px;
    text-decoration: line-through;
    color: rgba(255,255,255,0.6);
}
.pu-savings {
    background: #dc2626;
    color: #fff;
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* FIX 4: Shipping — amber/gold, not pale yellow ─────────────── */
.pu-shipping {
    background: #FFC82A;
    border: 1px solid #f59e0b;
    border-top: none;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.pu-shipping-icon { width: 20px; height: 20px; flex-shrink: 0; }
.pu-shipping p {
    margin: 0;
    font-size: 13px;
    color: #1E1E1E;
}
.pu-shipping p strong { font-weight: 800; }

/* ── CTA row ────────────────────────────────────────────────── */
.pu-cta-row { display: flex; gap: 10px; align-items: stretch; }

.pu-btn-no {
    flex: 1;
    padding: 13px 10px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    border-radius: 10px;
    font-size: 12px;
    color: black;
    cursor: pointer;
    font-weight: 400;
    text-align: center;
    transition: border-color .15s, color .15s;
}
.pu-btn-no:hover,.pu-btn-no:focus,.pu-btn-no:active {background: #9ca3af; border-color: #9ca3af; color: black; }

.pu-btn-yes {
    flex: 1.5;
    padding: 13px 14px;
    background: #dc2626;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .18s;
    position: relative;
}
.pu-btn-yes:hover { background: #b91c1c; }
.pu-btn-yes.pu-loading { opacity: .75; pointer-events: none; }
.pu-btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

.pu-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pu-spin .65s linear infinite;
    flex-shrink: 0;
}
.pu-btn-yes.pu-loading .pu-spinner { display: inline-block; }
.pu-btn-yes.pu-loading .pu-btn-icon { display: none; }
@keyframes pu-spin { to { transform: rotate(360deg); } }

/* ── FIX 5: Guarantee — LEFT aligned ───────────────────────── */
.pu-guarantee {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* left, not center */
    gap: 6px;
}
.pu-guarantee-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: .6; }
.pu-guarantee span { font-size: 11.5px; color: #9ca3af; }

/* ── Error toast ────────────────────────────────────────────── */
.pu-error-toast {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    padding: 9px 18px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    animation: pu-toast-in .25s ease forwards, pu-toast-out .25s ease 3s forwards;
}
@keyframes pu-toast-in  { from { opacity:0; transform:translateX(-50%) translateY(6px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }
@keyframes pu-toast-out { from { opacity:1; } to { opacity:0; } }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .patronus-upsell-overlay { padding: 0; align-items: flex-end; }
    .patronus-upsell-modal {
        flex-direction: column;
        border-radius: 18px 18px 0 0;
        max-height: 95dvh;
        max-width: 100%;
        width: 100%;
    }
    .patronus-upsell-left { flex: 0 0 400px; min-height: 0; }
    .patronus-upsell-right { padding: 18px 16px 24px; gap: 20px; }
    /* On mobile the headline CAN wrap — remove nowrap constraint */
    .pu-header h2 { font-size: 18px; white-space: normal; }
    .pu-price-now { font-size: 22px; }
    .pu-cta-row { flex-direction: column; }
    .pu-btn-no, .pu-btn-yes { flex: none; width: 100%; }
}
@media (max-width: 780px) and (min-width: 601px) {
    .patronus-upsell-left { flex: 0 0 34%; min-height: 0; }
}
