/* =========================================================
   Spiff League — Master Styles (Optimized & Updated)
   ========================================================= */

/* ---------------------------------------------------------
   Color Tokens
--------------------------------------------------------- */
:root {
    --app-bg: #868686;
    --base-white: #ffffff;
    --gray-900: #101828;
    --gray-800: #1D2939;
    --gray-700: #344054;
    --gray-600: #475467;
    --gray-500: #667085;
    --gray-300: #d0d5dd;
    --gray-200: #EAECF0;
    --blue-600: #1570EF;
    --green-500: #16B364;
    --purple-500: #7A5AF8;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden !important;
}


/* Body lock when intro is open */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

body.no-scroll .mobile-container {
    overflow: hidden;
    /* stop background scroll when popup is open */
}


/* ---------------------------------------------------------
   Base Layout
--------------------------------------------------------- */
body {
    max-width: 420px;
    margin: 0 auto;
    background: var(--base-white);
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: var(--gray-700);
    position: relative;
}

.wrapper {
    height: 100%;
}

.mobile-container {
    width: 100%;
    min-height: 100vh;
    background: var(--base-white);
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}




/* Modern viewport-safe height – fixes address bar jump */
@supports (height: 100dvh) {
    .mobile-container {
        min-height: 100dvh;
    }
}

@supports (height: 100svh) {
    .mobile-container {
        min-height: 100svh;
    }
}


.auth-wrapper {
    padding: 20px;
}

/* ---------------------------------------------------------
   Typography
--------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
}

a {
    color: var(--blue-600);
    font-weight: 600;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ---------------------------------------------------------
   Form Controls
--------------------------------------------------------- */
.form-label {
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    background: var(--base-white);
    font-size: 14px;
    color: var(--gray-900);
    box-shadow: var(--shadow-xs);
}

.form-control:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(22, 179, 100, 0.15);
}

.form-control.is-invalid+.input-group-text {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}


/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
    font-size: 16px;
    font-weight: 600;
    padding: 10px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: 0.2s ease;
}

.btn-success {
    background: var(--green-500);
    border-color: var(--green-500);
    color: var(--base-white);
    border-radius: 8px;
}

.btn-success:hover {
    background: #149e47;
    border-color: #149e47;
}

/* ---------------------------------------------------------
   HEADER (Fixed)
--------------------------------------------------------- */
.sl-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    height: 60px;
    background: var(--base-white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    z-index: 1030;
}

.sl-logo-icon {
    height: 40px;
}

.navbar-toggler {
    border: none !important;
}

/* ---------------------------------------------------------
   HERO
--------------------------------------------------------- */

.sl-hero {
    background: var(--gray-700);
    padding: 30px 15px 40px;
    color: var(--base-white);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.body-header-fixed .sl-hero {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    z-index: 2;
}

.sl-hero::after {
    content: "";
    display: block;
    clear: both;
    height: 10px;
    border-radius: 12px 12px 0 0;
    background: #fff;
    position: fixed;
    bottom: 0;
    width: 100%;
    left: 0;
}

.sl-hero-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sl-hero-value {
    font-size: 24px;
    font-weight: 600;
}

.sl-hero-label {
    color: var(--gray-300);
}

.sl-hero-divider {
    width: 1px;
    background: var(--gray-800);
}

/* ---------------------------------------------------------
   MAIN CONTENT PANEL
--------------------------------------------------------- */
.sl-content-scroll {
    position: fixed;
    top: var(--sl-top-offset);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: var(--base-white);
    overscroll-behavior-y: contain;
}

.sl-main-content {
    width: 100%;
    padding: 5px 15px 15px;
    background: var(--base-white);
    position: relative;
    z-index: 1;
}


/* ---------------------------------------------------------
   Earnings Cards
--------------------------------------------------------- */
.sl-earning-card {
    background: var(--base-white);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    padding: 15px;
    margin-bottom: 15px;
}

.sl-earning-row {
    display: flex;
    justify-content: space-between;
}

.sl-earning-label {
    font-size: 14px;
    margin-bottom: 6px;
}

.sl-earning-date,
.sl-earning-amount {
    font-size: 24px;
    font-weight: 500;
}

.sl-earning-amount {
    color: var(--green-500);
}

.sl-earning-row--bottom {
    border-top: 1px solid var(--gray-200);
    padding-top: 10px;
}

.sl-earning-points span {
    font-weight: 700;
    color: var(--purple-500);
}

/* ---------------------------------------------------------
   FAB — Add Receipt
--------------------------------------------------------- */
.sl-add-receipt {
    position: absolute;
    right: 17px;
    bottom: 19px;
    width: 60px;
    height: 60px;
    border-radius: 100px;
    background: var(--blue-600);
    border: none;
    color: #fff;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1040;
}

/* ---------------------------------------------------------
   INTRO POPUP (Bottom Sheet)
--------------------------------------------------------- */

/* Dark overlay */
.sl-intro-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

/* Force hide before JS runs */
.sl-intro-popup,
.sl-intro-overlay {
    opacity: 0 !important;
    bottom: -100% !important;
    pointer-events: none !important;
}

/* Bottom sliding popup */
.sl-intro-popup {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: -100%;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 40px 24px;
    z-index: 2001;
    transition: bottom .35s ease;
    max-height: calc(100vh - 158px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Active states */
.sl-intro-popup.active {
    bottom: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.sl-intro-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Titles + Text */
.sl-intro-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 30px;
}

/* Items */
.sl-intro-item {
    display: flex;
    align-items: start;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

/* Steps */
.sl-intro-steps {
    padding: 0;
}

.sl-intro-steps li {
    list-style: none;
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 18px;
}

.step-box {
    background: #000;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Footer text */
.sl-intro-footer {
    color: var(--gray-600);
    font-style: italic;
    padding: 10px 0;
}

/* Button */
.sl-intro-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 18px;
}

/* ---------------------------------------------------------
   Payment Option UI
--------------------------------------------------------- */
.payment-option-wrapper {
    display: flex;
    width: 100%;
    gap: 12px;
    margin-bottom: 15px;
}

.payment-option {
    flex: 1;
    display: flex;
    padding: 10px;
    gap: 10px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: 0.2s;
    align-items: center;
}

.payment-option.selected {
    background: #ECFDF3;
    border-color: #16B364;
}

.payment-check .circle {
    width: 18px;
    height: 18px;
    border: 2px solid #D0D5DD;
    border-radius: 50%;
    display: flex;
}

.payment-option.selected .circle {
    display: none;
}

.payment-option:not(.selected) svg {
    display: none;
}

/* ---------------------------------------------------------
   Offcanvas Menu
--------------------------------------------------------- */
.sl-offcanvas {
    background: var(--gray-700);
    color: #fff;
    width: 260px;
}

.sl-offcanvas-close {
    position: absolute;
    top: 16px;
    right: 16px;
    filter: invert(1);
    opacity: 0.7;
    z-index: 2;
}

.offcanvas-body {
    position: relative;
}

.offcanvas-notes {
    position: absolute;
    bottom: 10px;
    padding: 20px;
    text-align: left;
}

.sl-menu {
    margin-top: 40px;
}

.sl-menu-item {
    display: block;
    padding: 18px 24px;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid var(--gray-800);
}

.sl-menu-item:hover {
    background: #050816;
}

.sl-menu-item.is-active {
    color: var(--green-500);
}

/* ---------------------------------------------------------
   ORDER / ADD RECEIPT PAGE
--------------------------------------------------------- */
.sl-order-page {
    background: var(--gray-700, #344054);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.sl-order-header {
    margin-bottom: 15px;
}

.sl-order-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #98A2B3;
    font-size: 16px;
    text-decoration: none;
}

.sl-order-back span {
    margin-top: 2px;
}

.sl-order-main {
    margin-top: 8px;
}

.sl-order-title {
    color: var(--base-white, #FFF);
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 32px;
    margin-bottom: 15px;
}

.sl-receipt-upload {
    border-radius: 4px;
    background: var(--gray-400, #98A2B3);
    display: flex;
    min-height: 300px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    margin-bottom: 20px;
    position: relative;
}

.sl-receipt-inner {
    text-align: center;
    color: #F9FAFB;
}

.sl-receipt-text-main {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.sl-receipt-text-sub {
    font-size: 14px;
    opacity: 0.85;
}

.sl-receipt-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}


.sl-order-page .form-label {
    color: var(--gray-100, #F2F4F7);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

/* Text / select boxes */
.sl-order-page .form-control,
.sl-order-page .form-select {
    display: flex;
    padding: 10px 14px;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    border-radius: 8px;
    border: 1px solid var(--gray-300, #D0D5DD);
    background: var(--base-white, #FFF);
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
}

/* Input with right icon */
.sl-input-with-icon {
    position: relative;
}

.sl-input-with-icon .form-control,
.sl-input-with-icon .form-select {
    padding-right: 40px;
}

.sl-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

/* SKU list */
.sl-sku-list .sl-sku-row+.sl-sku-row {
    margin-top: 8px;
}

/* Add SKU button */
.sl-add-sku-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    padding-left: 0;
    gap: 8px;
    display: inline-flex;
    align-items: center;
}



/* Submit button */
.sl-order-submit {
    font-size: 18px;
    font-weight: 600;
}

.sl-receipt-preview {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid #D0D5DD;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
}

/* Remove icon button */
.sl-receipt-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #667085;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    line-height: 1;
}

.sl-receipt-remove i {
    font-size: 22px;
    color: #D92D20;
}



/* ---------------------------------------------------------
   Profile Page
--------------------------------------------------------- */
.sl-profile-name {
    color: var(--base-white, #FFF);
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 32px;
    margin-bottom: 4px;
}

.sl-profile-meta {
    color: var(--gray-300, #D0D5DD);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

.sl-profile-list {
    margin: 0;
    border-radius: 0;
}

.sl-profile-row {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 0;
    padding-right: 0;
    border-color: #EAECF0;
    flex-direction: column;
    align-items: start;
}

.sl-profile-label {
    font-size: 14px;
    color: #667085;
}

.sl-profile-value {
    font-size: 14px;
    color: #101828;
    font-weight: 500;
    text-align: left;
}

.sl-profile-list .list-group-item:last-child {
    border-bottom: none;
}

/* FAQ hero */

.sl-faq-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sl-faq-title {
    color: var(--base-white, #FFF);
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 32px;
}

.sl-faq-subtitle {
    color: var(--gray-300, #D0D5DD);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
}

/* Card wrapper */
.sl-faq-card {
    border-radius: 12px;
    background: var(--base-white);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

/* Accordion styling */
.sl-faq-accordion .accordion-item {
    border-color: var(--gray-200);
}

.sl-faq-accordion .accordion-button {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
    padding: 14px 16px;
    background-color: var(--base-white);
    box-shadow: none;
}

.sl-faq-accordion .accordion-button::after {
    width: 18px;
    height: 18px;
    background-size: 18px;
}

.sl-faq-accordion .accordion-button:not(.collapsed) {
    color: var(--gray-900);
    background-color: #16B364;
    box-shadow: inset 0 -1px 0 var(--gray-200);
}

.sl-faq-accordion .accordion-body {
    font-size: 14px;
    color: var(--gray-700);
    padding: 10px 16px 14px 16px;
}


/* ===========================
   PWA Install Banner
   =========================== */
.sl-pwa-banner {
    position: fixed;
    inset-inline: 0;
    top: 15px;
    z-index: 1080;
    display: flex;
    justify-content: center;
    padding: 0 12px 16px;
    pointer-events: none;
    /* card handles clicks */
}

.sl-pwa-banner.sl-pwa-banner--visible {
    animation: slPwaSlideUp 220ms ease-out forwards;
}

.sl-pwa-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(226, 232, 240, 0.9);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    pointer-events: auto;
}

/* Icon */
.sl-pwa-icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ecfdf3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sl-pwa-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
}

/* Text */
.sl-pwa-body {
    flex: 1;
    min-width: 0;
}

.sl-pwa-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.sl-pwa-text {
    font-size: 12px;
    color: #6b7280;
}

/* Actions */
.sl-pwa-actions .btn {
    font-size: 12px;
    padding-inline: 12px;
}

/* Animation */
@keyframes slPwaSlideUp {
    from {
        transform: translateY(110%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .sl-pwa-card {
        padding-inline: 12px;
    }
}



/* ---------------------------------------------------------
   Media Query
--------------------------------------------------------- */
@media (min-width: 460px) {
    html {
        background: var(--app-bg);
    }

}

@media (max-width: 460px) {
    body, .body-header-fixed .sl-hero, .body-header-fixed .sl-main-content, .sl-content-scroll {
        width: 100%;
        max-width: 100%;
    }

    .offcanvas, .offcanvas-lg, .offcanvas-md, .offcanvas-sm, .offcanvas-xl, .offcanvas-xxl {
        width: 100% !important;
        max-width: 100% !important;
    }
}


@media (max-width: 420px) {
    .sl-add-receipt {
        position: fixed;
    }
}


@media (max-width: 320px) {

    .sl-hero-value,
    .sl-earning-date,
    .sl-earning-amount {
        font-size: 20px;
    }
}