/* Scoped offer UI: reuses the current storefront's blue/navy glass palette. */
.sv-offer-popup,
.sv-offer-form {
    --sv-offer-text: var(--bom-deep, #103c5b);
    --sv-offer-muted: var(--bom-muted, #626071);
    --sv-offer-blue: var(--bom-purple, #0e4f83);
    --sv-offer-line: var(--bom-line, rgba(14, 79, 131, .16));
    color: var(--sv-offer-text);
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
.sv-offer-popup *, .sv-offer-form * { box-sizing: border-box; }
.sv-offer-popup[hidden], .sv-offer-backdrop[hidden], .sv-offer-form [hidden] { display: none !important; }
body.sv-offer-modal-open { overflow: hidden; }
.sv-offer-backdrop { position: fixed; inset: 0; z-index: 899; background: rgba(16, 60, 91, .2); backdrop-filter: blur(2px); }
.sv-offer-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 900;
    width: min(400px, calc(100% - 40px));
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(231, 241, 250, .97));
    box-shadow: 0 16px 48px rgba(14, 79, 131, .2), inset 0 1px 0 #fff;
    backdrop-filter: blur(14px);
}
.sv-offer-eyebrow { display: block; padding-right: 32px; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.sv-offer-popup h2 { margin: 12px 24px 8px 0; color: var(--sv-offer-text); font-size: 25px; line-height: 1.15; letter-spacing: -.02em; }
.sv-offer-intro { margin: 0 0 16px; color: var(--sv-offer-muted); font-size: 14px; line-height: 1.5; }
.sv-offer-popup .sv-offer-close {
    position: absolute; top: 8px; right: 8px; display: grid; place-items: center;
    width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0;
    color: var(--sv-offer-text) !important; background: transparent !important; border: 0; border-radius: 50%;
    box-shadow: none !important; font-size: 28px; line-height: 1; cursor: pointer;
}
.sv-offer-close:hover { background: rgba(14, 79, 131, .07); }
.sv-offer-form { min-width: 0; margin: 0; }
.sv-offer-fields { display: grid; min-width: 0; gap: 12px; }
.sv-offer-fields > label { color: var(--sv-offer-text); font-size: 14px; line-height: 1.4; }
.sv-offer-form .sv-offer-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; min-width: 0; }
.sv-offer-row input[type="email"] {
    flex: 1 1 180px; width: 100%; min-width: 0; min-height: 48px;
    padding: 12px 16px; border: 1px solid #7e93a4; border-radius: 24px;
    background: #fff; color: var(--sv-offer-text); font: inherit; font-size: 16px;
}
.sv-offer-row button {
    flex: 1 1 180px; min-height: 48px; padding: 12px 16px;
    border: 1px solid rgba(255,255,255,.7); border-radius: 24px;
    background: linear-gradient(145deg, var(--sv-offer-blue), #103c5b) !important;
    color: #fff !important; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.4;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(14,79,131,.14) !important;
    cursor: pointer; white-space: normal;
}
.sv-offer-row button:hover { background: #103c5b !important; transform: none; }
.sv-offer-row button:disabled { opacity: .7; cursor: wait; }
.sv-offer-fields label.sv-offer-consent { display: flex; align-items: flex-start; gap: 9px; margin: 0; font-size: 12px; font-weight: 400; line-height: 1.5; cursor: pointer; }
.sv-offer-consent input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--sv-offer-blue); }
.sv-offer-help { margin: 0; color: var(--sv-offer-muted); font-size: 12px; line-height: 1.5; }
.sv-offer-help a { color: var(--sv-offer-blue); text-decoration: underline; text-underline-offset: 2px; }
.sv-offer-status { margin: 0; color: var(--sv-offer-text); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.sv-offer-status:empty { display: none; }
.sv-offer-status.is-error { color: #8f2432; }
.sv-offer-status:not(:empty) { padding: 12px; border: 1px solid var(--sv-offer-line); border-radius: 12px; background: #fff; }
.sv-offer-form--compact { display: block; padding: 0; border: 0; border-radius: 0; background: transparent; }
.sv-offer-form--compact .sv-offer-row { display: grid; }
.sv-offer-form--compact .sv-offer-row input, .sv-offer-form--compact .sv-offer-row button { width: 100%; }
.sv-offer-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sv-offer-popup :focus-visible, .sv-offer-form :focus-visible { outline: 3px solid var(--sv-offer-blue); outline-offset: 3px; }
@media (max-width: 620px) {
    .sv-offer-popup { left: 50%; top: auto; bottom: max(var(--sv-offer-bottom, 88px), env(safe-area-inset-bottom)); transform: translateX(-50%); width: calc(100% - 24px); max-width: 360px; max-height: min(58dvh, 440px, calc(100dvh - var(--sv-offer-bottom, 88px) - 24px)); padding: 20px; border-radius: 20px; }
    .sv-offer-popup h2 { font-size: 23px; }
    .sv-offer-intro { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
    .sv-offer-popup:not([hidden]) { animation: sv-offer-enter .2s ease-out; }
    @keyframes sv-offer-enter { from { opacity: 0; } to { opacity: 1; } }
}
