/**
 * SP Promo Popup
 * No @import — fonts loaded via wp_enqueue_style
 */

/* ===== Reset — prevent theme bleed ===== */
#spp-overlay *,
#spp-overlay *::before,
#spp-overlay *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Overlay ===== */
#spp-overlay.spp-overlay {
    position: fixed;
    inset: 0;
    z-index: 998000;
    pointer-events: none;
    background: transparent;
    transition: background .3s ease;
}
#spp-overlay.spp-overlay.spp-active {
    pointer-events: auto;
    background: rgba(0,0,0,.45);
}

/* ===== Panel — single white panel, gentle arc ===== */
#spp-panel.spp-panel {
    position: fixed;
    top: -10%;
    left: 0;
    bottom: -10%;
    width: 55vw;
    max-width: 820px;
    z-index: 999000;
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
    overflow: visible;
}
#spp-overlay.spp-active #spp-panel.spp-panel {
    transform: translateX(0);
    opacity: 1;
}

/* ===== Main content area — subtle arc like MA ===== */
#spp-panel .spp-main {
    flex: 1;
    background: #f0f4f8;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0 50% 50% 0;
    box-shadow: 8px 0 var(--spp-shadow-blur, 20px) rgba(0,0,0, var(--spp-shadow-alpha, .4)),
                4px 0 calc(var(--spp-shadow-blur, 20px) * 0.4) rgba(0,0,0, calc(var(--spp-shadow-alpha, .4) * 0.7));
}

/* ===== Accent swoosh — gradient along the arc ===== */
#spp-panel .spp-accent-strip {
    position: absolute;
    top: -10%;
    bottom: -10%;
    left: 0;
    right: 0;
    border-radius: 0 50% 50% 0;
    pointer-events: none;
    z-index: 1;
    opacity: .8;
}

/* hide main scrollbar */
#spp-panel .spp-main::-webkit-scrollbar { width: 0; }
#spp-panel .spp-main { scrollbar-width: none; }

/* ===== Close button ===== */
#spp-panel .spp-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10 !important;
    transition: color .2s ease !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1 !important;
    font-size: 0 !important;
    text-indent: -9999px;
}
#spp-panel .spp-close svg {
    display: block !important;
    text-indent: 0;
}
#spp-panel .spp-close:hover,
#spp-panel .spp-close:focus {
    color: #1e293b !important;
}

/* ===== Logo ===== */
#spp-panel .spp-logo {
    text-align: center;
    margin-bottom: 24px;
}
#spp-panel .spp-logo img {
    max-height: 48px;
    width: auto;
    display: inline-block;
}

/* ===== Hero section ===== */
#spp-panel .spp-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 50px 40px 23%;
    position: relative;
}

#spp-panel .spp-hero-content {
    max-width: 55%;
    min-width: 0;
    text-align: center;
}

/* ===== Headline ===== */
#spp-panel .spp-headline {
    font-family: 'Oswald', sans-serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--spp-text-color, #002868);
    line-height: 1.1;
    margin: 0 0 8px;
    letter-spacing: -.3px;
}

#spp-panel .spp-discount {
    font-size: 52px;
    color: var(--spp-text-color, #002868);
    display: block;
    line-height: 1;
    margin-top: 4px;
}

#spp-panel .spp-subtext {
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    color: #64748b;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 28px;
}

/* ===== Category buttons (stacked, full-width) ===== */
#spp-panel .spp-cat-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

#spp-panel .spp-cat-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #2c3e5a;
    color: #fff !important;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    border-radius: 10px;
    transition: all .15s ease;
    letter-spacing: .3px;
}
#spp-panel .spp-cat-btn:hover {
    background: #002868;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,40,104,.2);
}
#spp-panel .spp-cat-btn-all {
    background: transparent;
    color: #0f172a !important;
    border: 2px solid #d1d5db;
}
#spp-panel .spp-cat-btn-all:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a !important;
    box-shadow: none;
}

/* ===== Claimed code display ===== */
#spp-panel .spp-claimed-code {
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 16px 24px;
    margin: 16px 0;
    text-align: center;
}
#spp-panel .spp-claimed-code-text {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #002868;
    letter-spacing: 2px;
}

/* ===== Notice ===== */
#spp-panel .spp-notice {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 6px;
    text-align: center;
    margin-top: 10px;
}
#spp-panel .spp-notice-success {
    background: #ecfdf5;
    color: #059669;
}
#spp-panel .spp-notice-error {
    background: #fef2f2;
    color: #dc2626;
}

/* ===== Email capture panel ===== */
#spp-panel .spp-email-panel {
    text-align: center;
    margin-bottom: 20px;
}

#spp-panel .spp-email-heading {
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #002868;
    margin: 0 0 6px;
    line-height: 1.2;
}

#spp-panel .spp-email-subtext {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.4;
}

#spp-panel .spp-email-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#spp-panel .spp-email-input {
    width: 100% !important;
    padding: 13px 16px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 10px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 15px !important;
    color: #0f172a !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .15s ease !important;
    box-sizing: border-box !important;
}
#spp-panel .spp-email-input:focus {
    border-color: #002868 !important;
}
#spp-panel .spp-email-input::placeholder {
    color: #94a3b8;
}
#spp-panel .spp-email-input[readonly] {
    background-color: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

#spp-panel .spp-email-submit {
    display: block !important;
    width: 100% !important;
    background: #2c3e5a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 24px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
    box-shadow: none !important;
    letter-spacing: .3px !important;
}
#spp-panel .spp-email-submit:hover:not(:disabled) {
    background: #002868 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,40,104,.2) !important;
}
#spp-panel .spp-email-submit:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

#spp-panel .spp-email-continue {
    display: block !important;
    width: 100% !important;
    background: #002868 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 24px !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background .15s ease !important;
    box-shadow: none !important;
    margin-top: 12px !important;
}
#spp-panel .spp-email-continue:hover {
    background: #001d4f !important;
}

/* ===== Dismiss link ===== */
#spp-panel .spp-dismiss {
    display: inline-block !important;
    background: none !important;
    border: none !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: underline !important;
    box-shadow: none !important;
    outline: none !important;
    transition: color .15s ease !important;
}
#spp-panel .spp-dismiss:hover {
    color: #64748b !important;
}

/* ===== Hero product image — hanging off the arc ===== */
#spp-panel > .spp-hero-image {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    z-index: 5;
    pointer-events: auto;
}
#spp-panel > .spp-hero-image a {
    display: inline-block;
    text-decoration: none !important;
    width: fit-content;
}
#spp-panel > .spp-hero-image img {
    max-width: 100% !important;
    max-height: 380px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    filter: none;
}

/* ===== Mobile hero image (inside scroll area) ===== */
.spp-hero-image-mobile {
    display: none;
}

/* ===== Hero shimmer / sheen ===== */
#spp-panel > .spp-hero-image a {
    position: relative;
    overflow: hidden;
}
#spp-panel > .spp-hero-image a::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -120%;
    width: 60%;
    height: 140%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255,255,255,.12) 42%,
        rgba(255,255,255,.35) 50%,
        rgba(255,255,255,.12) 58%,
        transparent 70%
    );
    transform: skewX(-18deg);
    animation: spp-shimmer 4s ease-in-out 1.5s infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes spp-shimmer {
    0%   { left: -120%; opacity: 0; }
    10%  { opacity: 1; }
    60%  { left: 180%; opacity: 1; }
    70%  { opacity: 0; }
    100% { left: 180%; opacity: 0; }
}

/* ===== Floating tab ===== */
#spp-tab.spp-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 84px;
    height: 84px;
    background: #BF0A30;
    border-radius: 0 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 997000;
    box-shadow: 3px 2px 12px rgba(0,0,0,.12);
    transition: transform .2s ease, box-shadow .2s ease;
}
#spp-tab.spp-tab:hover {
    transform: translateY(-50%) translateX(3px);
    box-shadow: 4px 3px 18px rgba(0,0,0,.18);
}
#spp-tab.spp-tab.spp-tab-hidden {
    transform: translateY(-50%) translateX(-100%);
    pointer-events: none;
    opacity: 0;
}

#spp-tab .spp-tab-text {
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .8px;
    line-height: 1.2;
    text-align: center;
    padding: 0 6px;
}

/* ===== Email panel back link ===== */
.spp-email-back {
    display: inline-block !important;
    margin-top: 28px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8 !important;
    text-decoration: underline !important;
    transition: color .15s ease;
}
.spp-email-back:hover {
    color: #0f172a !important;
}

/* ===== Category Nav Bar ===== */
.spp-category-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    margin: 0 0 24px;
    background: var(--spp-nav-bg, #002868);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.spp-category-nav-breadcrumb {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--spp-nav-text, #ffffff);
    opacity: .6;
    letter-spacing: .3px;
}
.spp-category-nav-breadcrumb a {
    color: var(--spp-nav-text, #ffffff) !important;
    opacity: .6;
    text-decoration: none !important;
    transition: opacity .15s ease;
}
.spp-category-nav-breadcrumb a:hover {
    opacity: 1 !important;
}
.spp-breadcrumb-sep {
    margin: 0 8px;
    opacity: .4;
}
.spp-breadcrumb-current {
    color: var(--spp-nav-text, #ffffff);
    opacity: 1;
    font-weight: 700;
}
.spp-category-nav-link {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b !important;
    text-decoration: none !important;
    background: #f1f5f9;
    padding: 8px 20px;
    border-radius: 6px;
    letter-spacing: .3px;
    transition: background .2s ease;
}
.spp-category-nav-link:hover {
    background: #fff;
    color: #1e293b !important;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    #spp-overlay.spp-overlay {
        height: 100dvh;
        height: -webkit-fill-available;
    }
    #spp-panel.spp-panel {
        width: 85vw;
        max-width: 85vw;
        top: 0;
        bottom: 0;
    }
    #spp-panel .spp-main {
        border-radius: 0 45% 45% 0;
    }
    #spp-panel .spp-accent-strip {
        border-radius: 0 45% 45% 0;
    }
    #spp-panel .spp-hero {
        padding: 50px 24px 30px;
    }
    #spp-panel .spp-hero-content {
        max-width: 100%;
    }
    #spp-panel > .spp-hero-image {
        display: none;
    }
    .spp-hero-image-mobile {
        display: block;
        text-align: center;
        padding: 10px 0 0;
    }
    .spp-hero-image-mobile a {
        display: inline-block;
        text-decoration: none !important;
    }
    .spp-hero-image-mobile img {
        max-height: 140px;
        width: auto;
        display: block;
        margin: 0 auto;
        object-fit: contain;
    }
    #spp-panel .spp-headline {
        font-size: 30px;
    }
    #spp-panel .spp-discount {
        font-size: 40px;
    }
    #spp-panel .spp-close {
        top: 12px !important;
        left: 12px !important;
        right: auto !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255,255,255,.85) !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
    }
    .spp-side-right #spp-panel .spp-close {
        left: auto !important;
        right: 12px !important;
    }
    .spp-side-right #spp-panel.spp-panel {
        left: auto !important;
        right: 0 !important;
        transform: translateX(100%) !important;
    }
    .spp-side-right.spp-active #spp-panel.spp-panel {
        transform: translateX(0) !important;
    }
    .spp-side-right #spp-panel .spp-main {
        border-radius: 45% 0 0 45% !important;
        box-shadow: -8px 0 var(--spp-shadow-blur, 20px) rgba(0,0,0, var(--spp-shadow-alpha, .4)),
                    -4px 0 calc(var(--spp-shadow-blur, 20px) * 0.4) rgba(0,0,0, calc(var(--spp-shadow-alpha, .4) * 0.7)) !important;
    }
    .spp-side-right #spp-panel .spp-accent-strip {
        border-radius: 45% 0 0 45% !important;
    }
    .spp-side-right #spp-panel .spp-hero {
        padding: 50px 24px 30px;
    }
}

/* ===== Right-side overrides ===== */
.spp-side-right #spp-panel.spp-panel {
    left: auto !important;
    right: 0 !important;
    transform: translateX(100%) !important;
}
.spp-side-right.spp-active #spp-panel.spp-panel {
    transform: translateX(0) !important;
}
.spp-side-right #spp-panel .spp-main {
    border-radius: 50% 0 0 50% !important;
    box-shadow: -8px 0 var(--spp-shadow-blur, 20px) rgba(0,0,0, var(--spp-shadow-alpha, .4)),
                -4px 0 calc(var(--spp-shadow-blur, 20px) * 0.4) rgba(0,0,0, calc(var(--spp-shadow-alpha, .4) * 0.7)) !important;
}
.spp-side-right #spp-panel .spp-accent-strip {
    border-radius: 50% 0 0 50% !important;
}
.spp-side-right #spp-panel .spp-close {
    right: auto !important;
    left: 20px !important;
}
.spp-side-right #spp-panel .spp-hero {
    padding: 40px 23% 40px 50px;
    justify-content: flex-end;
}
.spp-side-right #spp-panel > .spp-hero-image {
    right: auto !important;
    left: -80px !important;
}
#spp-tab.spp-tab.spp-tab-right {
    left: auto !important;
    right: 0 !important;
    border-radius: 50% 0 0 50% !important;
}
#spp-tab.spp-tab.spp-tab-right:hover {
    transform: translateY(-50%) translateX(-3px) !important;
}
#spp-tab.spp-tab.spp-tab-right.spp-tab-hidden {
    transform: translateY(-50%) translateX(100%) !important;
}
