
:root {
    --sc-navy: #0F1B3D;
    --sc-blue: #0b6bff;
    --sc-green: #0B7A3E;
    --sc-text: #3A4668;
}

#sc-root,
#sc-root * {
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

/* =========================================
   Floating Button (Desktop)
========================================= */

#sc-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sc-blue);
    color: #fff;
    border: 0;
    cursor: pointer;
    padding: 16px 26px;
    border-radius: 0.5rem;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(11, 107, 255, .4);
    transition: transform .15s ease;
}

#sc-fab:hover {
    transform: translateY(-2px);
}

#sc-fab:focus-visible,
.sc-btn:focus-visible,
#sc-close:focus-visible {
    outline: 3px solid #FFB020;
    outline-offset: 2px;
}

/* =========================================
   Popup Panel (Desktop)
========================================= */

#sc-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 9999;
    width: 330px;
    background: #fff;
    color: var(--sc-navy);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(15, 27, 61, .25);
    display: none;
    flex-direction: column;
}

#sc-panel.sc-open {
    display: flex;
    animation: sc-pop .2s ease;
}

@keyframes sc-pop {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* =========================================
   Close Button
========================================= */

#sc-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--sc-text);
}

/* =========================================
   Heading and Description
========================================= */

.sc-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px;
    padding-right: 28px;
}

.sc-sub {
    font-size: 14px;
    line-height: 1.4;
    color: var(--sc-text);
    margin: 0 0 16px;
}

/* =========================================
   Choice Buttons
========================================= */

#sc-choices {
    display: flex;
    flex-direction: column;
}

.sc-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 0.5rem;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    text-align: left;

    /* Follow HTML order */
    order: 0;
}

.sc-btn svg {
    flex-shrink: 0;
}

.sc-btn span {
    display: block;
}

.sc-btn small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: .9;
    margin-top: 2px;
}

/* WhatsApp */

.sc-wa {
    background: var(--sc-green);
    color: #fff;
    border: 2px solid var(--sc-green);
}

/* Email */

.sc-mail {
    background: #fff;
    color: var(--sc-navy);
    border: 2px solid var(--sc-navy);
}

/* Start Your Order */

.sc-order {
    background: var(--sc-blue);
    color: #fff;
    border: 2px solid var(--sc-blue);
}

/* Free Templates */

.sc-tpl {
    background: #EAF2FF;
    color: var(--sc-navy);
    border: 2px solid var(--sc-blue);
}

/* Optional email-first class */
#sc-choices.sc-email-first .sc-mail {
    order: 0;
}

/* =========================================
   Overlay
========================================= */

#sc-overlay {
    display: none;
}

/* =========================================
   Mobile: Full-width Button + Bottom Sheet
========================================= */

@media (max-width: 640px) {

    #sc-fab {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        border-radius: 0.5rem;
        justify-content: center;
        padding: 16px;
        box-shadow: 0 6px 24px rgba(11, 107, 255, .45);
    }

    #sc-panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
    }

    #sc-panel.sc-open {
        animation: sc-slide .25s ease;
    }

    @keyframes sc-slide {
        from {
            transform: translateY(100%);
        }
        to {
            transform: none;
        }
    }

    #sc-overlay.sc-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 9997;
        background: rgba(15, 27, 61, .55);
    }

    .sc-title {
        font-size: 22px;
    }

    /* Align all button icons and text consistently */

    .sc-btn {
        display: grid;
        grid-template-columns: 22px 1fr;
        align-items: center;
        justify-content: initial;
        gap: 12px;
        text-align: left;
        padding: 14px 16px;
    }

    .sc-btn svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        justify-self: center;
    }

    .sc-btn > span {
        display: block;
        text-align: left;
        min-width: 0;
    }

    .sc-btn small {
        text-align: left;
        line-height: 1.4;
    }
}

/* =========================================
   Reduced Motion Accessibility
========================================= */

@media (prefers-reduced-motion: reduce) {
    #sc-panel.sc-open {
        animation: none;
    }

    #sc-fab {
        transition: none;
    }
}



/* Centered Free Sample Slide popup */
#sc-panel.sc-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100% - 32px));
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10000;
    border-radius: 16px;
}

/* Remove the normal popup animation when centered */
#sc-panel.sc-centered.sc-open {
    animation: sc-center-pop .25s ease;
}

@keyframes sc-center-pop {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Mobile */
@media (max-width: 640px) {
    #sc-panel.sc-centered {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: calc(100% - 32px);
        max-width: 420px;
        max-height: 85vh;
        border-radius: 16px;
        padding: 24px 20px;
    }
}
