/* Salescap responsive layer — layout and UX only */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.sf-body,
body.sf-auth,
body.sc-sign,
body.sc-join {
    overflow-x: hidden;
    max-width: 100%;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

.sf-body *,
.sf-auth *,
.sc-sign *,
.sc-join * {
    box-sizing: border-box;
}

.sf-body .main-content,
.sf-body .sf-shell,
.sf-body .container {
    min-width: 0;
    max-width: 100%;
}

.sf-icon-btn,
.sf-pill,
.sf-chat,
.sc-back,
.sf-btn,
.sf-body .btn,
.sf-body .btn-main,
.sf-body #login,
.sf-body #register,
.sf-body #deposit,
.sf-body #autoStart,
.sf-body .grab_button,
.sf-auth #login,
.sf-auth #register,
.sc-sign button,
.sc-join button {
    min-height: 44px;
}

.sf-body .form-control,
.sf-auth .form-control,
.sc-sign input,
.sc-join input,
.sc-sign select,
.sc-join select,
.sf-body select,
.sf-body textarea {
    max-width: 100%;
    font-size: 16px;
}

.sf-body table {
    max-width: 100%;
}

.sf-body .card-body,
.sf-body .table-responsive,
.sf-body .dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sf-chat {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
}

.sf-topbar {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
}

.sf-body .main-sidebar {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.wa-app {
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 767.98px) {
    :root {
        --sf-header: 64px;
    }

    .sf-topbar {
        height: var(--sf-header);
        padding-top: env(safe-area-inset-top);
        height: calc(var(--sf-header) + env(safe-area-inset-top));
    }

    .sf-brand img {
        height: 48px;
        max-width: 168px;
    }

    .sf-pill {
        height: 36px;
        max-width: 118px;
        padding: 0 12px;
        font-size: 13px;
    }

    .sf-title {
        font-size: clamp(26px, 8vw, 36px);
        margin-bottom: 12px;
    }

    .sf-body .main-content > .container,
    .sf-body .sf-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .sf-body.has-back .main-content {
        margin-top: calc(var(--sf-header) + env(safe-area-inset-top) + 46px);
    }

    .sf-body.sf-home .main-content {
        margin-top: calc(var(--sf-header) + env(safe-area-inset-top));
    }

    .sf-shop-head {
        padding: 12px 4px 10px;
    }

    .sf-shop-head h1 {
        font-size: 26px;
    }

    .sf-pair {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0 2px;
    }

    .sf-tile.is-raised {
        transform: none;
    }

    .sf-quick {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .sf-quick a {
        min-height: 64px;
        font-size: 12px;
    }

    .db-hero-copy {
        max-width: 72%;
    }

    .db-art,
    .db-phone {
        transform: scale(0.86);
        transform-origin: right bottom;
    }

    .db-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .db-tile {
        min-height: 64px;
        padding: 10px 8px;
    }

    .mh-hero h1 {
        font-size: 26px;
    }

    .cs-swoosh {
        width: 120px;
        height: 110px;
        right: -18px;
        top: -24px;
    }

    .sc-card {
        padding: 22px 16px 18px;
    }

    .sc-sign-wrap,
    .sc-join-wrap {
        width: 100%;
        padding: 16px 14px 28px;
    }

    .pf-secure {
        border-left: 0;
        padding-left: 0;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .sf-body .main-content > .container {
        max-width: 740px;
    }

    .sf-body.sf-wide .main-content > .container,
    .sf-body.sf-home .main-content > .container {
        max-width: 860px;
    }

    .sf-pair {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        padding: 0 10px;
    }

    .sf-shop-head {
        padding: 22px 10px 14px;
    }

    body.sf-dash .main-content > .container,
    body.sf-events .main-content > .container,
    body.sf-profile .sf-shell,
    body.sf-support .main-content > .container {
        max-width: 640px !important;
    }

    .db-hero-copy {
        max-width: 60%;
    }

    .mh-hero,
    .mh-cats,
    .mh-deals,
    .mh-promos {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .sf-body .main-content > .container {
        max-width: 980px;
    }

    .sf-body.sf-wide .main-content > .container,
    .sf-body.sf-home .main-content > .container {
        max-width: 1180px;
    }

    .sf-pair {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        padding: 0 8px 8px;
    }

    .sf-shop-head h1 {
        font-size: 40px;
    }

    .sf-shop-head {
        padding: 28px 8px 18px;
    }

    body.sf-dash .main-content > .container,
    body.sf-events .main-content > .container,
    body.sf-profile .sf-shell {
        max-width: 760px !important;
    }

    .db-hero-copy {
        max-width: 58%;
    }

    .mh-hero {
        grid-template-columns: 1.15fr 0.85fr;
    }

    .mh-cats,
    .mh-deals,
    .mh-promos {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sc-sign-wrap,
    .sc-join-wrap {
        width: min(560px, calc(100% - 48px));
    }
}

@media (min-width: 1400px) {
    .sf-body.sf-wide .main-content > .container,
    .sf-body.sf-home .main-content > .container {
        max-width: 1280px;
    }

    .sf-pair {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 420px) {
    .sf-pill {
        max-width: 92px;
        padding: 0 10px;
        font-size: 12px;
    }

    .sf-brand img {
        height: 42px;
        max-width: 132px;
    }

    .db-hero-copy {
        max-width: 100%;
    }

    .db-art {
        display: none;
    }

    .db-grab {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .sf-tile.is-raised,
    .sf-tile:hover {
        transform: none;
    }

    .sf-body .menu-sidebar ul li a {
        min-height: 48px;
        padding: 14px 6px;
    }
}
