:root{
    color-scheme:light;

    --sf-app-font:"DM Sans",sans-serif;
    --sf-app-heading:"Space Grotesk","DM Sans",sans-serif;

    --sf-app-width:690px;
    --sf-sheet-width:460px;

    --sf-app-page:#f4f7fb;
    --sf-app-page-deep:#edf2f7;

    --sf-app-surface:#ffffff;
    --sf-app-surface-2:#f8fafc;
    --sf-app-surface-3:#f1f5f9;
    --sf-app-surface-soft:#f8fafc;

    --sf-app-primary:#0b2858;
    --sf-app-primary-hover:#071f48;
    --sf-app-primary-soft:#eef4ff;
    --sf-app-primary-border:#cad8ee;

    --sf-app-secondary:#315f9f;

    --sf-app-text:#0b2858;
    --sf-app-text-soft:#334155;
    --sf-app-soft:#64748b;
    --sf-app-muted:#94a3b8;

    --sf-app-border:#dce5ef;
    --sf-app-border-light:#edf2f7;

    --sf-app-green:#0fa958;
    --sf-app-green-soft:#eafff2;
    --sf-app-green-border:#ace8c4;

    --sf-app-danger:#dc2626;
    --sf-app-danger-soft:#fef2f2;

    --sf-app-warning:#d97706;
    --sf-app-warning-soft:#fff8e7;

    --sf-app-header-height:72px;
}

/* ==========================================================================
   RESET
   ========================================================================== */

*,
*::before,
*::after{
    box-sizing:border-box;
}

html{
    width:100%;
    min-height:100%;
    margin:0;
    padding:0;
    scroll-behavior:smooth;
    scroll-padding-top:82px;
    background:#edf2f7;
}

body{
    width:100%;
    min-width:0;
    min-height:100vh;
    margin:0;
    padding:0;
    overflow-x:hidden;
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(11,40,88,.045),
            transparent 36%
        ),
        #edf2f7;
    color:var(--sf-app-text);
    font-family:var(--sf-app-font);
    font-size:14px;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

html.sf-sheet-open,
body.sf-sheet-open{
    overflow:hidden!important;
}

button,
input,
select,
textarea{
    font:inherit;
}

button,
a{
    -webkit-tap-highlight-color:transparent;
}

button{
    margin:0;
}

a{
    color:inherit;
    text-decoration:none;
}

img{
    max-width:100%;
}

[hidden]{
    display:none!important;
}

/* ==========================================================================
   APP
   ========================================================================== */

.storefront-app{
    position:relative;
    width:100%;
    max-width:var(--sf-app-width);
    min-height:100dvh;
    margin:0 auto;
    overflow:hidden;
    background:linear-gradient(
        180deg,
        #ffffff 0%,
        #f8fafc 20%,
        #f4f7fb 100%
    );
    border-right:1px solid rgba(148,163,184,.18);
    border-left:1px solid rgba(148,163,184,.18);
    box-shadow:0 0 55px rgba(15,23,42,.045);
}

.storefront-main{
    width:100%;
    min-height:calc(100dvh - var(--sf-app-header-height));
    padding-top:var(--sf-app-header-height);
    background:transparent;
}

.sf-app-shell,
.sf-shell{
    width:calc(100% - 30px);
    max-width:640px;
    margin:0 auto;
}

/* ==========================================================================
   SHEET BACKDROP
   ========================================================================== */

.sf-sheet-backdrop{
    position:fixed;
    inset:0;
    z-index:5000;
    background:rgba(15,23,42,.50);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
    transition:
        opacity .2s ease,
        visibility .2s ease;
}

.sf-sheet-backdrop.is-open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

/* ==========================================================================
   SHARED BOTTOM SHEET
   ========================================================================== */

.sf-bottom-sheet{
    position:fixed;
    right:50%;
    bottom:0;
    z-index:5001;

    width:min(var(--sf-sheet-width),100%);
    max-height:min(89dvh,740px);

    border:1px solid var(--sf-app-border);
    border-bottom:0;
    border-radius:24px 24px 0 0;

    display:flex;
    flex-direction:column;

    overflow:hidden;

    background:#fff;

    box-shadow:
        0 -18px 55px rgba(15,23,42,.17);

    visibility:hidden;
    opacity:0;
    pointer-events:none;

    transform:translate(50%,105%);

    transition:
        transform .26s cubic-bezier(.22,.8,.32,1),
        opacity .2s ease,
        visibility .26s ease;
}

.sf-bottom-sheet.is-open{
    visibility:visible;
    opacity:1;
    pointer-events:auto;
    transform:translate(50%,0);
}

/* no bottom gap and no bottom radius */
.sf-bottom-sheet{
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
}

/* ==========================================================================
   HANDLE
   ========================================================================== */

.sf-sheet-handle{
    width:40px;
    height:4px;
    flex:0 0 auto;
    margin:9px auto 1px;
    border-radius:999px;
    background:#d2dce7;
}

/* ==========================================================================
   CLOSE BUTTON
   ========================================================================== */

.sf-sheet-close{
    width:34px;
    height:34px;
    flex:0 0 34px;
    padding:0;
    border:1px solid var(--sf-app-border);
    border-radius:10px;
    display:grid;
    place-items:center;
    outline:0;
    background:#fff;
    color:#718096;
    font-size:10px;
    cursor:pointer;
    transition:
        border-color .18s ease,
        background-color .18s ease,
        color .18s ease,
        transform .18s ease;
}

.sf-sheet-close:hover{
    border-color:#c7d4e2;
    background:#f8fafc;
    color:var(--sf-app-primary);
}

.sf-sheet-close:active{
    transform:scale(.96);
}

/* ==========================================================================
   EMPTY SHEET
   ========================================================================== */

.sf-sheet-empty{
    min-height:170px;
    padding:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
}

.sf-sheet-empty>span{
    width:46px;
    height:46px;
    margin-bottom:8px;
    border:1px solid var(--sf-app-primary-border);
    border-radius:14px;
    display:grid;
    place-items:center;
    background:var(--sf-app-primary-soft);
    color:var(--sf-app-primary);
    font-size:12px;
}

.sf-sheet-empty strong{
    color:var(--sf-app-primary);
    font-size:10px;
    font-weight:700;
}

.sf-sheet-empty small{
    max-width:290px;
    margin-top:3px;
    color:var(--sf-app-muted);
    font-size:7px;
    line-height:1.45;
}

/* ==========================================================================
   TOAST
   ========================================================================== */

.sf-toast-wrap{
    position:fixed;
    top:12px;
    left:50%;
    z-index:8000;
    width:min(430px,calc(100vw - 24px));
    display:grid;
    gap:8px;
    transform:translateX(-50%);
    pointer-events:none;
}

.sf-toast{
    min-height:58px;
    padding:10px;
    border:1px solid var(--sf-app-border);
    border-radius:14px;
    display:grid;
    grid-template-columns:36px minmax(0,1fr);
    align-items:center;
    gap:9px;
    background:rgba(255,255,255,.99);
    box-shadow:0 16px 40px rgba(15,23,42,.13);
    opacity:0;
    transform:translateY(-8px);
    transition:.18s ease;
}

.sf-toast.is-visible{
    opacity:1;
    transform:translateY(0);
}

.sf-toast-icon{
    width:36px;
    height:36px;
    border-radius:10px;
    display:grid;
    place-items:center;
    background:var(--sf-app-primary-soft);
    color:var(--sf-app-primary);
    font-size:10px;
}

.sf-toast strong{
    display:block;
    color:var(--sf-app-primary);
    font-size:10px;
    line-height:1.2;
    font-weight:700;
}

.sf-toast small{
    display:block;
    margin-top:2px;
    color:var(--sf-app-soft);
    font-size:8px;
    line-height:1.4;
}

.sf-toast-success{
    border-color:var(--sf-app-green-border);
}

.sf-toast-success .sf-toast-icon{
    background:var(--sf-app-green-soft);
    color:var(--sf-app-green);
}

.sf-toast-error{
    border-color:#fecaca;
}

.sf-toast-error .sf-toast-icon{
    background:var(--sf-app-danger-soft);
    color:var(--sf-app-danger);
}

.sf-toast-warning{
    border-color:#f4ddb0;
}

.sf-toast-warning .sf-toast-icon{
    background:var(--sf-app-warning-soft);
    color:var(--sf-app-warning);
}

/* ==========================================================================
   TABLET
   ========================================================================== */

@media(max-width:768px){

    html,
    body{
        background:var(--sf-app-page);
    }

    .storefront-app{
        max-width:none;
        border:0;
        box-shadow:none;
    }

    .sf-app-shell,
    .sf-shell{
        width:calc(100% - 22px);
        max-width:none;
    }

}

/* ==========================================================================
   PHONE
   ========================================================================== */

@media(max-width:540px){

    :root{
        --sf-app-header-height:64px;
    }

    .storefront-main{
        padding-top:64px;
    }

    .sf-app-shell,
    .sf-shell{
        width:calc(100% - 20px);
    }

    .sf-bottom-sheet{
        width:100%;
        max-height:92dvh;
        border-right:0;
        border-left:0;
        border-radius:22px 22px 0 0;
    }

}

/* ==========================================================================
   SMALL PHONE
   ========================================================================== */

@media(max-width:380px){

    .sf-app-shell,
    .sf-shell{
        width:calc(100% - 18px);
    }

}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media(prefers-reduced-motion:reduce){

    html{
        scroll-behavior:auto;
    }

    *,
    *::before,
    *::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }

}