/* ==========================================================================
   TFast Hub mobile app shell
   Native-style chrome for the primary mobile experience: safe areas, five-tab
   navigation, app transitions, bottom sheets, sticky actions, skeletons,
   pull-to-refresh, offline / empty / error states and keyboard safety.
   Loaded after marketplace.css on the public and customer layouts; every
   rule is scoped to phones/tablets or the installed app so desktop keeps the
   existing presentation.
   ========================================================================== */

:root {
    --tf-safe-top: env(safe-area-inset-top, 0px);
    --tf-safe-bottom: env(safe-area-inset-bottom, 0px);
    --tf-tabbar-h: 62px;
    --tf-blue: #0961ed;
    --tf-blue-soft: #eef4ff;
    --tf-ink: #10233f;
    --tf-muted: #53647a;
    --tf-line: #e4eaf1;
    --tf-canvas: #f6f8fb;
    --tf-danger: #d92d20;
    --tf-kb-h: 0px;
}

html.tf-shell {
    -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   1. Safe-area aware chrome
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .navbar.fixed-top {
        padding-top: var(--tf-safe-top);
    }

    body.tf-account .us-topbar {
        height: calc(var(--us-topbar-h) + var(--tf-safe-top));
        padding-top: var(--tf-safe-top);
    }

    body.tf-account .tf-account-main {
        padding-top: calc(80px + var(--tf-safe-top));
    }

    /* The account main already clears the fixed header: keep page wrappers flat. */
    body.tf-account .tf-account-main .dashboard-wrapper {
        padding-top: 0 !important;
    }

    body.tf-account footer#footer.footer {
        display: none;
    }
}

body.app-mode .us-topbar {
    top: var(--tf-safe-top);
}

/* Account header: wallet pill and a single leading control (back or menu) */
.us-wallet {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 700;
    gap: 6px;
    min-height: 40px;
    padding: 4px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.us-wallet:hover,
.us-wallet:focus-visible {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.us-wallet i {
    font-size: 14px;
}

@media (max-width: 991.98px) {
    .us-topbar .tf-back-btn {
        display: none;
    }

    .us-topbar.is-back .tf-back-btn {
        align-items: center;
        color: #fff;
        display: inline-flex;
    }

    .us-topbar.is-back .us-menu-btn {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    body.tf-account .us-topbar .us-currency {
        display: none;
    }
}

@media (max-width: 359.98px) {
    .us-wallet span {
        display: none;
    }

    .us-wallet {
        padding: 4px 10px;
    }
}

/* The installed app keeps a slim, safe-area aware account header. */
@media (display-mode: standalone) {
    .tf-pwa-banner {
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom) + 12px) !important;
    }
}

/* --------------------------------------------------------------------------
   2. Five-tab bottom navigation (Home / Services / New Order / Orders / Account)
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .bottom-nav.marketplace-tabs {
        height: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom));
        padding-bottom: var(--tf-safe-bottom) !important;
        overflow: visible;
    }

    .bottom-nav.marketplace-tabs > ul.nav {
        height: var(--tf-tabbar-h);
        align-items: stretch;
    }

    .bottom-nav.marketplace-tabs .nav-item {
        flex: 1 1 20% !important;
        max-width: 20% !important;
    }

    .bottom-nav.marketplace-tabs .nav-item .nav-link {
        color: var(--tf-muted) !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        gap: 4px !important;
        justify-content: flex-end !important;
        padding: 7px 2px 7px !important;
        position: relative;
    }

    .bottom-nav.marketplace-tabs .nav-item .nav-link i {
        font-size: 19px;
    }

    .bottom-nav.marketplace-tabs .nav-item .nav-link.active {
        color: var(--tf-blue) !important;
    }

    /* Centre action: raised New Order button */
    .bottom-nav.marketplace-tabs .tf-tab-action .nav-link {
        justify-content: center !important;
        gap: 3px !important;
    }

    .bottom-nav.marketplace-tabs .tf-tab-fab {
        align-items: center;
        background: var(--tf-blue);
        border: 4px solid #fff;
        border-radius: 18px;
        box-shadow: 0 10px 22px rgba(9, 97, 237, .34);
        display: grid;
        height: 54px;
        place-items: center;
        transform: translateY(-16px);
        width: 54px;
    }

    .bottom-nav.marketplace-tabs .tf-tab-fab i {
        color: #fff !important;
        font-size: 21px !important;
    }

    .bottom-nav.marketplace-tabs .tf-tab-action .nav-link.active .tf-tab-fab {
        box-shadow: 0 12px 26px rgba(9, 97, 237, .46);
    }

    .bottom-nav.marketplace-tabs .tf-tab-action .nav-link span {
        margin-top: -12px;
    }

    /* Unread / active-count badges */
    .tf-tab-badge {
        align-items: center;
        background: var(--tf-danger);
        border: 2px solid #fff;
        border-radius: 999px;
        color: #fff;
        display: inline-flex;
        font-size: 9.5px;
        font-weight: 700;
        justify-content: center;
        line-height: 1;
        min-height: 17px;
        min-width: 17px;
        padding: 2px 4px;
        position: absolute;
        right: calc(50% - 22px);
        top: 4px;
    }

    .tf-tab-action .tf-tab-badge {
        right: calc(50% - 26px);
        top: 0;
    }
}

/* --------------------------------------------------------------------------
   3. Back buttons and route progress
   -------------------------------------------------------------------------- */

.tf-back-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: inherit;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 17px;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.tf-back-btn:hover,
.tf-back-btn:focus-visible {
    background: rgba(16, 35, 63, .06);
}

.navbar .tf-back-btn {
    color: var(--tf-ink);
    margin-right: 2px;
}

@media (min-width: 992px) {
    .tf-back-btn.tf-back-mobile {
        display: none !important;
    }
}

.tf-route-bar {
    background: var(--tf-blue);
    box-shadow: 0 0 8px rgba(9, 97, 237, .55);
    height: 3px;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    transition: opacity .3s ease;
    width: 40%;
    z-index: 2100;
}

.tf-route-bar.is-active {
    animation: tf-progress 1.4s ease-in-out infinite;
    opacity: 1;
}

@keyframes tf-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* --------------------------------------------------------------------------
   4. App-style page transitions (progressive enhancement)
   -------------------------------------------------------------------------- */

@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: tf-vt-out .16s ease both;
}

::view-transition-new(root) {
    animation: tf-vt-in .24s cubic-bezier(.32, .72, 0, 1) both;
}

@keyframes tf-vt-out {
    to { opacity: 0; transform: translateY(-4px); }
}

@keyframes tf-vt-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
    html.tf-shell body.tf-enter {
        animation: tf-page-in .22s cubic-bezier(.32, .72, 0, 1) both;
    }
}

@keyframes tf-page-in {
    from { opacity: .4; }
    to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   5. Bottom sheets on phones (existing Bootstrap modals become sheets)
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
    .modal .modal-dialog {
        align-items: flex-end;
        bottom: 0;
        left: 0;
        margin: 0;
        max-width: none;
        min-height: 0;
        position: fixed;
        right: 0;
        top: auto;
        transform: translateY(102%);
        transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    }

    .modal.fade .modal-dialog,
    .modal.show .modal-dialog {
        transform: translateY(102%);
    }

    .modal.show .modal-dialog {
        transform: translateY(0);
    }

    .modal .modal-dialog::before {
        background: rgba(16, 35, 63, .22);
        border-radius: 999px;
        content: "";
        display: block;
        flex: 0 0 auto;
        height: 4px;
        margin: 8px auto 0;
        max-width: 38px;
        width: 38px;
    }

    .modal .modal-content {
        border: 0;
        border-radius: 20px 20px 0 0;
        max-height: 88dvh;
        overflow: auto;
        padding-bottom: var(--tf-safe-bottom);
    }

    .modal .modal-header {
        padding-top: 10px;
    }

    .modal-backdrop.show {
        opacity: .55;
    }
}

/* Custom lightweight sheet used by the shell (session expiry, quick actions) */
.tf-sheet-backdrop {
    background: rgba(9, 18, 34, .55);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .25s ease;
    z-index: 1090;
}

.tf-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.tf-sheet {
    visibility: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 20px 20px 0 0;
    bottom: 0;
    box-shadow: 0 -18px 48px rgba(9, 18, 34, .22);
    left: 0;
    max-height: min(86dvh, calc(100dvh - var(--tf-kb-h)));
    padding: 8px 20px calc(20px + var(--tf-safe-bottom));
    position: fixed;
    right: 0;
    transform: translateY(105%);
    transition: transform .32s cubic-bezier(.32, .72, 0, 1);
    z-index: 1100;
}

.tf-sheet.is-open {
    visibility: visible;
    transform: translateY(0);
}

.tf-sheet::before {
    background: rgba(16, 35, 63, .22);
    border-radius: 999px;
    content: "";
    display: block;
    height: 4px;
    margin: 0 auto 14px;
    width: 38px;
}

.tf-sheet h3 {
    color: var(--tf-ink);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
}

.tf-sheet p {
    color: var(--tf-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 16px;
}

.tf-sheet .tf-sheet-actions {
    display: grid;
    gap: 10px;
}

.tf-sheet .tf-sheet-actions .cmn-btn,
.tf-sheet .tf-sheet-actions .btn {
    justify-content: center;
    min-height: 46px;
    width: 100%;
}

.tf-sheet-icon {
    align-items: center;
    background: var(--tf-blue-soft);
    border-radius: 16px;
    color: var(--tf-blue);
    display: grid;
    font-size: 22px;
    height: 54px;
    margin-bottom: 12px;
    place-items: center;
    width: 54px;
}

/* --------------------------------------------------------------------------
   6. Sticky primary actions
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .tf-sticky-action {
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--tf-line);
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom));
        box-shadow: 0 -10px 26px rgba(16, 35, 63, .08);
        display: grid;
        gap: 10px;
        margin: 18px -12px -12px;
        padding: 12px 12px calc(12px + 2px);
        position: sticky;
        z-index: 1028;
    }

    .tf-sticky-action .cmn-btn,
    .tf-sticky-action .btn {
        justify-content: center;
        min-height: 48px;
        margin: 0;
        width: 100%;
    }

    /* The order form's primary submit keeps the total in reach. */
    body.tf-account .order-submit-button {
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom));
        box-shadow: 0 10px 26px rgba(9, 97, 237, .3);
        margin-top: 14px;
        position: sticky;
        z-index: 1028;
    }

    .order-guide-total,
    .order-guide {
        border-radius: 14px;
    }

    /* Forms whose only action is a submit button at the form bottom. */
    body.tf-account .tf-sticky-cta {
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom) + 10px);
        box-shadow: 0 10px 26px rgba(9, 97, 237, .28);
        justify-content: center;
        margin-top: 16px;
        position: sticky;
        width: 100%;
        z-index: 1028;
    }
}

/* --------------------------------------------------------------------------
   7. Skeletons
   -------------------------------------------------------------------------- */

.tf-skeleton {
    animation: tf-shimmer 1.4s ease-in-out infinite;
    background: linear-gradient(100deg, #eef2f7 30%, #f7fafd 50%, #eef2f7 70%);
    background-size: 220% 100%;
    border-radius: 10px;
    display: block;
    height: 14px;
    overflow: hidden;
    width: 100%;
}

.tf-skeleton + .tf-skeleton {
    margin-top: 10px;
}

.tf-skeleton-card {
    background: #fff;
    border: 1px solid var(--tf-line);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px;
}

.tf-skeleton-card .tf-skeleton-avatar {
    border-radius: 12px;
    grid-row: span 3;
    height: 48px;
    width: 48px;
}

.tf-skeleton-card .tf-skeleton-line {
    height: 12px;
}

.tf-skeleton-card .tf-skeleton-line.is-short {
    width: 45%;
}

.tf-skeleton-card + .tf-skeleton-card {
    margin-top: 10px;
}

.marketplace-state-loading {
    background: transparent;
    padding: 4px 0;
    text-align: left;
}

/* Documentation tables stay horizontally scrollable instead of stacking. */
@media (max-width: 991.98px) {
    .tf-table-scroll {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto !important;
    }

    .tf-table-scroll table {
        min-width: 520px;
    }

    .tf-account-main pre,
    .tf-account-main code {
        overflow-wrap: anywhere;
        white-space: pre-wrap;
    }
}

@keyframes tf-shimmer {
    from { background-position: 180% 0; }
    to { background-position: -60% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tf-skeleton {
        animation: none;
    }
}

/* --------------------------------------------------------------------------
   8. Empty / error / offline states
   -------------------------------------------------------------------------- */

.tf-state {
    background: #fff;
    border: 1px solid var(--tf-line);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    justify-items: center;
    margin: 14px 0;
    padding: 32px 22px;
    text-align: center;
}

.tf-state-icon {
    align-items: center;
    background: var(--tf-blue-soft);
    border-radius: 50%;
    color: var(--tf-blue);
    display: grid;
    font-size: 24px;
    height: 64px;
    margin-bottom: 4px;
    place-items: center;
    width: 64px;
}

.tf-state h3 {
    color: var(--tf-ink);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.tf-state p {
    color: var(--tf-muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
    max-width: 42ch;
}

.tf-state .cmn-btn,
.tf-state .btn {
    justify-content: center;
    margin-top: 8px;
    min-height: 46px;
    min-width: 180px;
}

.tf-state.is-error .tf-state-icon {
    background: #fdecec;
    color: var(--tf-danger);
}

.tf-state.is-offline .tf-state-icon {
    background: #fff4e5;
    color: #b45309;
}

/* Inline form error surfaced next to the primary action. */
.tf-form-alert {
    align-items: flex-start;
    background: #fdecec;
    border: 1px solid #f5c2c2;
    border-radius: 12px;
    color: #8f1d18;
    display: flex;
    font-size: 13.5px;
    gap: 8px;
    line-height: 1.5;
    margin-top: 12px;
    padding: 10px 12px;
}

.tf-form-alert[hidden] {
    display: none;
}

body.dark-theme .tf-form-alert {
    background: rgba(220, 53, 69, .16);
    border-color: rgba(220, 53, 69, .4);
    color: #ffb3b3;
}

/* Offline / connectivity bar */
.tf-offline-bar {
    align-items: center;
    background: #1b2333;
    bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom) + 10px);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(9, 18, 34, .3);
    color: #fff;
    display: flex;
    font-size: 13px;
    gap: 10px;
    left: 50%;
    max-width: calc(100vw - 24px);
    padding: 9px 10px 9px 16px;
    position: fixed;
    transform: translateX(-50%);
    z-index: 1095;
}

.tf-offline-bar[hidden] {
    display: none;
}

.tf-offline-bar button {
    background: rgba(255, 255, 255, .14);
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    min-height: 32px;
    padding: 4px 14px;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   9. Pull to refresh
   -------------------------------------------------------------------------- */

.tf-ptr {
    align-items: center;
    background: #fff;
    border: 1px solid var(--tf-line);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(16, 35, 63, .18);
    color: var(--tf-blue);
    display: grid;
    height: 42px;
    left: 50%;
    opacity: 0;
    place-items: center;
    position: fixed;
    top: calc(var(--tf-safe-top) + 8px);
    transform: translate(-50%, -58px);
    transition: transform .2s ease, opacity .2s ease;
    width: 42px;
    z-index: 1098;
}

.tf-ptr i {
    font-size: 17px;
}

.tf-ptr.is-pulling {
    opacity: 1;
    transition: none;
}

.tf-ptr.is-refreshing {
    opacity: 1;
    transform: translate(-50%, 0);
}

.tf-ptr.is-refreshing i {
    animation: tf-spin .8s linear infinite;
}

@keyframes tf-spin {
    to { transform: rotate(360deg); }
}

html.tf-ptr-ready,
html.tf-ptr-ready body {
    overscroll-behavior-y: contain;
}

/* --------------------------------------------------------------------------
   10. Keyboard safety
   -------------------------------------------------------------------------- */

html.tf-kb-open .marketplace-tabs,
html.tf-kb-open .tf-pwa-banner,
html.tf-kb-open .tf-pwa-update,
html.tf-kb-open .tf-chat-toggle {
    display: none !important;
}

/* Keep floating helpers out of the way while a sheet or drawer is open. */
body.modal-open .tf-chat-toggle {
    display: none !important;
}

body:has(.offcanvas.show) .tf-chat-toggle,
body:has(.tf-sheet.is-open) .tf-chat-toggle {
    display: none !important;
}

html.tf-kb-open .tf-offline-bar {
    bottom: calc(var(--tf-safe-bottom) + 10px);
}

/* --------------------------------------------------------------------------
   11. Account content: no website breadcrumbs, cards for tables on phones
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    body.tf-account .breadcrumb-area .breadcrumb {
        display: none;
    }

    body.tf-account .breadcrumb-area {
        align-items: flex-start;
        margin-bottom: 16px;
    }

    body.tf-account .dashboard-wrapper .card,
    body.tf-account .dashboard-wrapper .box-card {
        border-radius: 14px;
    }
}

.tf-stacked-table {
    border-collapse: separate;
    border-spacing: 0;
    display: block;
    margin: 0;
    width: 100% !important;
}

.tf-stacked-table tbody {
    display: block;
    width: 100%;
}

.tf-stacked-table thead {
    display: none;
}

.tf-stacked-table tbody tr {
    background: #fff;
    border: 1px solid var(--tf-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 35, 63, .04);
    box-sizing: border-box;
    display: block;
    margin-bottom: 10px;
    overflow: hidden;
    padding: 4px 14px;
    width: 100%;
}

.tf-stacked-table tbody td {
    align-items: flex-start;
    border: 0;
    border-bottom: 1px dashed var(--tf-line);
    display: flex;
    flex-wrap: wrap;
    font-size: 13.5px;
    gap: 6px 14px;
    justify-content: space-between;
    overflow-wrap: anywhere;
    padding: 10px 0;
    text-align: right;
    vertical-align: middle;
    width: 100%;
}

.tf-stacked-table tbody td:last-child {
    border-bottom: 0;
}

.tf-stacked-table tbody td::before {
    color: var(--tf-muted);
    content: attr(data-tf-label);
    flex: 0 0 38%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
}

.tf-stacked-table tbody td.tf-cell-full {
    display: block;
    text-align: left;
}

.tf-stacked-table tbody td.tf-cell-full::before {
    display: none;
}

/* Long / multi-line values read better stacked under their label. */
.tf-stacked-table tbody td.tf-cell-block {
    display: block;
    text-align: left;
}

.tf-stacked-table tbody td.tf-cell-block::before {
    display: block;
    margin-bottom: 4px;
}

.tf-stacked-table tbody td.tf-cell-empty {
    display: none;
}

.tf-stacked-table .tf-stack-hide {
    display: none;
}

/* --------------------------------------------------------------------------
   11b. Primary actions use the app blue inside the mobile account shell
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    /* One accent for the mobile account shell; button classes that define
       their own background (soft/outline variants) keep their own styling. */
    body.tf-account {
        --navbar-active: #0961ed;
        --primary-color: #0961ed;
        --primary-color-opacity-low: rgba(9, 97, 237, .1);
        --btn-hover-bg: #0854cf;
    }
}

/* --------------------------------------------------------------------------
   12. Onboarding (first mobile launch)
   -------------------------------------------------------------------------- */

.tf-onboard {
    background: #fff;
    display: none;
    flex-direction: column;
    inset: 0;
    padding: calc(var(--tf-safe-top) + 12px) 0 calc(var(--tf-safe-bottom) + 8px);
    position: fixed;
    z-index: 1105;
}

.tf-onboard.is-open {
    display: flex;
}

.tf-onboard-top {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    padding: 0 16px;
}

.tf-onboard-skip {
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--tf-muted);
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    padding: 0 12px;
}

.tf-onboard-viewport {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.tf-onboard-track {
    display: flex;
    height: 100%;
    transition: transform .34s cubic-bezier(.32, .72, 0, 1);
    will-change: transform;
}

.tf-onboard-slide {
    align-items: center;
    display: flex;
    flex: 0 0 100%;
    flex-direction: column;
    justify-content: center;
    padding: 12px 28px;
    text-align: center;
}

.tf-onboard-art {
    align-items: center;
    background: var(--tf-blue-soft);
    border-radius: 28px;
    color: var(--tf-blue);
    display: grid;
    font-size: 44px;
    height: 128px;
    margin-bottom: 26px;
    place-items: center;
    width: 128px;
}

.tf-onboard-slide h2 {
    color: var(--tf-ink);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 10px;
}

.tf-onboard-slide p {
    color: var(--tf-muted);
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0 auto;
    max-width: 34ch;
}

.tf-onboard-foot {
    display: grid;
    gap: 14px;
    padding: 8px 24px 4px;
}

.tf-onboard-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
}

.tf-onboard-dots span {
    background: #d7dee8;
    border-radius: 999px;
    height: 7px;
    transition: width .2s ease, background .2s ease;
    width: 7px;
}

.tf-onboard-dots span.is-active {
    background: var(--tf-blue);
    width: 22px;
}

.tf-onboard-next {
    background: var(--tf-blue);
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    min-height: 52px;
    width: 100%;
}

.tf-onboard-next[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   12b. Signed-in wallet strip on the mobile home
   -------------------------------------------------------------------------- */

.sm-wallet-strip {
    display: none;
}

@media (max-width: 991.98px) {
    .sm-wallet-strip {
        display: block;
        padding: 14px 0 0;
    }

    .sm-wallet-strip-inner {
        align-items: center;
        background: #fff;
        border: 1px solid var(--tf-line);
        border-radius: 16px;
        box-shadow: 0 1px 2px rgba(16, 35, 63, .05);
        display: flex;
        gap: 12px;
        justify-content: space-between;
        padding: 13px 14px;
    }

    .sm-wallet-balance {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .sm-wallet-balance span {
        color: var(--tf-muted);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .sm-wallet-balance strong {
        color: var(--tf-ink);
        font-size: 17px;
        font-variant-numeric: tabular-nums;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sm-wallet-actions {
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
    }

    .sm-wallet-btn {
        align-items: center;
        background: var(--tf-blue);
        border-radius: 11px;
        color: #fff !important;
        display: inline-flex;
        font-size: 13px;
        font-weight: 700;
        gap: 6px;
        min-height: 42px;
        padding: 0 14px;
        text-decoration: none;
        white-space: nowrap;
    }

    .sm-wallet-btn-ghost {
        background: var(--tf-blue-soft);
        color: var(--tf-blue) !important;
        padding: 0 12px;
    }
}

body.dark-theme .sm-wallet-strip-inner {
    background: #192235;
    border-color: #2b3850;
    box-shadow: none;
}

body.dark-theme .sm-wallet-balance strong {
    color: #f5f7fb;
}

body.dark-theme .sm-wallet-btn-ghost {
    background: #1d2b45;
    color: #9dbbff !important;
}

/* --------------------------------------------------------------------------
   12c. Account wallet card (Wallet reachable in one tap from Account)
   -------------------------------------------------------------------------- */

.marketplace-account-wallet {
    align-items: center;
    background: linear-gradient(135deg, #0961ed, #0b3fa8);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(9, 97, 237, .22);
    color: #fff;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 0 0 16px;
    padding: 16px 18px;
}

.marketplace-account-wallet-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.marketplace-account-wallet-copy span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    opacity: .82;
    text-transform: uppercase;
}

.marketplace-account-wallet-copy strong {
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketplace-account-wallet-cta {
    align-items: center;
    background: #fff;
    border-radius: 12px;
    color: #0961ed !important;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 800;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    text-decoration: none;
    white-space: nowrap;
}

.marketplace-account-wallet-cta:hover {
    background: #eef4ff;
}

body.dark-theme .marketplace-account-wallet {
    background: linear-gradient(135deg, #1d3f8f, #142a63);
    box-shadow: none;
}

body.dark-theme .marketplace-account-wallet-cta {
    background: #dce8ff;
    color: #0b3fa8 !important;
}

/* --------------------------------------------------------------------------
   13. Installed-app shell refinements
   -------------------------------------------------------------------------- */

/* Compact install prompt on phones: above the tab bar, never over controls. */
@media (max-width: 991.98px) {
    .tf-pwa-banner.tf-pwa-banner {
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom) + 10px);
        left: 10px;
        max-width: none;
        padding: 10px 12px 10px;
        width: calc(100vw - 20px);
    }

    .tf-pwa-banner.tf-pwa-banner h6 {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .tf-pwa-banner.tf-pwa-banner p {
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        font-size: 12.5px;
        line-height: 1.45;
        margin-bottom: 8px;
        overflow: hidden;
    }

    /* Inside the account shell never let the install prompt block a tap on
       the primary action behind it. */
    body.tf-account .tf-pwa-banner {
        pointer-events: none;
    }

    body.tf-account .tf-pwa-banner button {
        pointer-events: auto;
    }
}

body.app-mode .tf-onboard {
    padding-top: calc(var(--tf-safe-top) + 12px);
}

body.app-mode .navbar,
body.app-mode .footer,
body.app-mode footer#footer,
body.app-mode .us-sidebar {
    display: none !important;
}

body.app-mode .bottom-nav.marketplace-tabs {
    box-shadow: 0 -6px 24px rgba(16, 35, 63, .08);
}

/* --------------------------------------------------------------------------
   14. Dark theme
   -------------------------------------------------------------------------- */

body.dark-theme .tf-tab-fab {
    border-color: #141d2e;
}

body.dark-theme .tf-tab-badge {
    border-color: #141d2e;
}

body.dark-theme .tf-sheet,
body.dark-theme .tf-state,
body.dark-theme .tf-stacked-table tbody tr,
body.dark-theme .tf-ptr,
body.dark-theme .tf-onboard {
    background: #192235;
    border-color: #2b3850;
    color: #b4bfd2;
}

body.dark-theme .tf-sheet h3,
body.dark-theme .tf-state h3,
body.dark-theme .tf-onboard-slide h2 {
    color: #f5f7fb;
}

body.dark-theme .tf-sheet p,
body.dark-theme .tf-state p,
body.dark-theme .tf-onboard-slide p {
    color: #b4bfd2;
}

body.dark-theme .tf-stacked-table tbody td {
    border-bottom-color: #2b3850;
    color: #f5f7fb;
}

body.dark-theme .tf-stacked-table tbody td::before {
    color: #8f9bb3;
}

body.dark-theme .tf-state-icon,
body.dark-theme .tf-sheet-icon {
    background: #1d2b45;
    color: #9dbbff;
}

body.dark-theme .tf-state.is-error .tf-state-icon {
    background: rgba(220, 53, 69, .22);
    color: #ff9aa4;
}

body.dark-theme .tf-sticky-action {
    background: rgba(20, 29, 46, .97);
    border-top-color: #2b3850;
}

body.dark-theme .tf-onboard-dots span {
    background: #33456b;
}

body.dark-theme .tf-onboard-dots span.is-active {
    background: #9dbbff;
}

/* --------------------------------------------------------------------------
   16. Multi-step wizards (order, mass order, KYC, profile, free order)
   Progressive enhancement: without JS every step is visible as today; the
   wizard only collapses to one step at a time once .tf-wizard-ready is set.
   -------------------------------------------------------------------------- */

.tf-steps {
    -webkit-overflow-scrolling: touch;
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scrollbar-width: none;
}

.tf-steps::-webkit-scrollbar {
    display: none;
}

.tf-step {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--tf-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12.5px;
    font-weight: 700;
    gap: 8px;
    padding: 2px;
    white-space: nowrap;
}

.tf-step-marker {
    align-items: center;
    background: #e8eef7;
    border-radius: 50%;
    color: #53647a;
    display: grid;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    height: 26px;
    place-items: center;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    width: 26px;
}

.tf-step.is-active {
    color: var(--tf-blue);
}

.tf-step.is-active .tf-step-marker {
    background: var(--tf-blue);
    box-shadow: 0 6px 14px rgba(9, 97, 237, .28);
    color: #fff;
}

.tf-step.is-done {
    color: var(--tf-blue);
}

.tf-step.is-done .tf-step-marker {
    background: #d8e6ff;
    color: var(--tf-blue);
}

.tf-step-connector {
    background: #e4eaf1;
    border-radius: 2px;
    flex: 1 1 14px;
    height: 2px;
    min-width: 12px;
}

.tf-step.is-done + .tf-step-connector {
    background: #bcd3ff;
}

/* Step panes */
.tf-wizard-step {
    display: block;
}

.tf-wizard-ready .tf-wizard-step {
    display: none;
}

.tf-wizard-ready .tf-wizard-step.is-active {
    animation: tf-wizard-in .22s cubic-bezier(.32, .72, 0, 1) both;
    display: block;
}

@keyframes tf-wizard-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.tf-wizard-ready .tf-wizard-step > .row > * {
    margin-top: 0;
}

.tf-wizard-step .order-step-heading {
    margin-top: 0;
}

/* Sticky step navigation */
.tf-wizard-nav {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
}

.tf-wizard-nav .cmn-btn,
.tf-wizard-nav .btn {
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 48px;
    width: 100%;
}

.tf-wizard-nav [hidden] {
    display: none !important;
}

.tf-wizard-back {
    background: #eef4ff;
    border: 0;
    color: var(--tf-blue) !important;
    font-weight: 700;
}

.tf-wizard-back:hover,
.tf-wizard-back:focus-visible {
    background: #e2ecff;
    color: var(--tf-blue) !important;
}

.tf-wizard-nav.is-first {
    grid-template-columns: 1fr;
}

/* The wizard's primary action carries the app accent at every width. */
.tf-wizard-nav .cmn-btn {
    background: var(--tf-blue);
    border-color: var(--tf-blue);
}

.tf-wizard-nav .cmn-btn:hover,
.tf-wizard-nav .cmn-btn:focus {
    background: #0854cf;
    border-color: #0854cf;
}

body.dark-theme .tf-wizard-nav .cmn-btn {
    background: #2f56c8;
    border-color: #2f56c8;
}

/* Mobile live summary above the sticky actions */
.tf-wizard-summary {
    align-items: center;
    background: #f2f6fc;
    border: 1px solid var(--tf-line);
    border-radius: 12px;
    display: none;
    gap: 12px;
    justify-content: space-between;
    margin-top: 16px;
    padding: 10px 12px;
}

.tf-wizard-summary-service {
    color: var(--tf-muted);
    font-size: 12.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tf-wizard-summary-total {
    color: var(--tf-ink);
    flex: 0 0 auto;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .tf-wizard-nav {
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--tf-line);
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom));
        box-shadow: 0 -10px 26px rgba(16, 35, 63, .08);
        margin: 18px -12px -12px;
        padding: 12px;
        position: sticky;
        z-index: 1028;
    }

    .tf-wizard-summary {
        display: flex;
    }
}

/* Review list rendered by the wizard on its final step */
.tf-review {
    display: grid;
    gap: 2px;
    margin: 0 0 18px;
}

.tf-review-row {
    align-items: flex-start;
    border-bottom: 1px dashed var(--tf-line);
    display: flex;
    font-size: 13.5px;
    gap: 14px;
    justify-content: space-between;
    padding: 9px 0;
}

.tf-review-row:last-child {
    border-bottom: 0;
}

.tf-review-row span {
    color: var(--tf-muted);
    flex: 0 0 42%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.tf-review-row strong {
    color: var(--tf-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
    text-align: right;
}

/* Payment options: one clean row per method at every width */
.tf-pay-option {
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--tf-line);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    margin: 0;
    min-height: 58px;
    padding: 10px 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    width: 100%;
}

.tf-pay-option:hover {
    border-color: #c9d8f0;
}

.tf-pay-option.is-selected {
    background: #f5f9ff;
    border-color: var(--tf-blue);
    box-shadow: 0 6px 16px rgba(9, 97, 237, .12);
}

.tf-pay-option input {
    flex: 0 0 auto;
    margin: 0;
}

.tf-pay-option-icon {
    align-items: center;
    background: #eef4ff;
    border-radius: 11px;
    color: var(--tf-blue);
    display: grid;
    flex: 0 0 auto;
    font-size: 15px;
    height: 38px;
    place-items: center;
    width: 38px;
}

.tf-pay-option-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tf-pay-option-copy strong {
    color: var(--tf-ink);
    font-size: 14px;
    font-weight: 700;
}

.tf-pay-option-copy small {
    color: var(--tf-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tf-pay-option-check {
    color: var(--tf-blue);
    flex: 0 0 auto;
    font-size: 18px;
    margin-left: auto;
    opacity: 0;
    transition: opacity .15s ease;
}

.tf-pay-option.is-selected .tf-pay-option-check {
    opacity: 1;
}

.tf-pay-note {
    color: var(--tf-muted);
    display: block;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 8px;
}

.tf-pay-group {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

body.dark-theme .tf-steps .tf-step-marker {
    background: #24365d;
    color: #b4bfd2;
}

body.dark-theme .tf-step.is-active .tf-step-marker {
    background: #9dbbff;
    color: #10233f;
}

body.dark-theme .tf-step.is-done .tf-step-marker {
    background: #1d2b45;
    color: #9dbbff;
}

body.dark-theme .tf-step-connector {
    background: #2b3850;
}

body.dark-theme .tf-wizard-summary {
    background: #192235;
    border-color: #2b3850;
}

body.dark-theme .tf-wizard-summary-total {
    color: #f5f7fb;
}

body.dark-theme .tf-pay-option {
    background: #192235;
    border-color: #2b3850;
}

body.dark-theme .tf-pay-option.is-selected {
    background: #1d2b45;
    border-color: #9dbbff;
}

body.dark-theme .tf-pay-option-copy strong {
    color: #f5f7fb;
}

body.dark-theme .tf-review-row strong {
    color: #f5f7fb;
}

body.dark-theme .tf-wizard-back {
    background: #1d2b45;
    color: #9dbbff !important;
}

@media (prefers-reduced-motion: reduce) {
    .tf-wizard-ready .tf-wizard-step.is-active {
        animation: none;
    }
}

/* --------------------------------------------------------------------------
   17. Wallet step cards share the wizard visual language
   -------------------------------------------------------------------------- */

.af-step-marker {
    align-items: center;
    background: var(--tf-blue);
    border-radius: 50%;
    box-shadow: 0 6px 14px rgba(9, 97, 237, .28);
    color: #fff;
    display: grid;
    font-size: 12px;
    font-weight: 800;
    height: 26px;
    place-items: center;
    width: 26px;
}

/* --------------------------------------------------------------------------
   18. Service description inside the order guide
   Provider descriptions are authored HTML; render them formatted and clamp
   long ones behind a Read more toggle.
   -------------------------------------------------------------------------- */

.order-guide-description h5 {
    margin-bottom: 8px;
}

.order-guide-description-body {
    -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent);
    color: var(--tf-muted);
    font-size: 13px;
    line-height: 1.62;
    mask-image: linear-gradient(180deg, #000 74%, transparent);
    max-height: 224px;
    overflow: hidden;
}

.order-guide-description-body:not(.is-clamped) {
    -webkit-mask-image: none;
    mask-image: none;
    max-height: none;
}

.order-guide-description-body h1,
.order-guide-description-body h2,
.order-guide-description-body h3,
.order-guide-description-body h4,
.order-guide-description-body h5,
.order-guide-description-body h6 {
    color: var(--tf-ink);
    font-size: 13px;
    font-weight: 700;
    margin: 12px 0 4px;
}

.order-guide-description-body p {
    margin: 0 0 8px;
}

.order-guide-description-body ul,
.order-guide-description-body ol {
    margin: 0 0 8px;
    padding-left: 18px;
}

.order-guide-description-body li {
    margin-bottom: 3px;
}

.order-guide-description-body strong {
    color: var(--tf-ink);
    font-weight: 700;
}

.order-guide-description-body a {
    color: var(--tf-blue);
}

.order-guide-description-body code {
    background: #f2f6fc;
    border-radius: 5px;
    font-size: 12px;
    padding: 1px 5px;
}

.order-guide-description-body img {
    border-radius: 8px;
    height: auto;
    max-width: 100%;
}

.order-guide-description-toggle {
    background: none;
    border: 0;
    color: var(--tf-blue);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 0 0;
}

.order-guide-description-toggle:hover,
.order-guide-description-toggle:focus-visible {
    text-decoration: underline;
}

body.dark-theme .order-guide-description-body h1,
body.dark-theme .order-guide-description-body h2,
body.dark-theme .order-guide-description-body h3,
body.dark-theme .order-guide-description-body h4,
body.dark-theme .order-guide-description-body h5,
body.dark-theme .order-guide-description-body h6,
body.dark-theme .order-guide-description-body strong {
    color: #f5f7fb;
}

body.dark-theme .order-guide-description-body code {
    background: #24365d;
}

body.dark-theme .order-guide-description-toggle {
    color: #9dbbff;
}

/* --------------------------------------------------------------------------
   19. Order platform switcher (chips)
   The legacy `.social-media-img{width:15px!important}` squashed the platform
   marks inside the order chips; restore the square size the design expects.
   On desktop the row wraps instead of scrolling off-screen.
   -------------------------------------------------------------------------- */

#new_order .platform-order-switcher .social-media-img,
#new_order .platform-order-link .social-media-img {
    height: 20px !important;
    object-fit: contain;
    width: 20px !important;
}

#new_order .platform-order-switcher .platform-mark,
#new_order .platform-order-link .platform-mark {
    height: 20px !important;
    min-width: 20px !important;
    width: 20px !important;
}

#new_order .platform-order-chip {
    box-shadow: 0 1px 2px rgba(16, 35, 63, .04);
}

@media (min-width: 992px) {
    #new_order .platform-order-switcher {
        flex-wrap: wrap;
        margin-bottom: 10px;
        overflow: hidden;
    }

    /* Collapsed: two rows of chips, the active platform always first. */
    #new_order .platform-order-switcher.is-collapsed {
        margin-bottom: 0;
        max-height: 96px;
        padding-bottom: 0;
    }

    /* Collapsed switcher + its "show all" control sit together. */
    #new_order .platform-order-switcher.is-collapsed + .platform-order-more {
        margin-top: 10px;
    }
}

.platform-order-more {
    align-items: center;
    background: #eef4ff;
    border: 1px dashed #b9cff5;
    border-radius: 10px;
    color: var(--tf-blue);
    display: none;
    font-size: 12.5px;
    font-weight: 700;
    gap: 7px;
    margin: 0 0 22px;
    min-height: 40px;
    padding: 8px 14px;
}

.platform-order-more[hidden] {
    display: none !important;
}

@media (min-width: 992px) {
    .platform-order-more {
        display: inline-flex;
    }
}

.platform-order-more:hover,
.platform-order-more:focus-visible {
    background: #e2ecff;
    border-color: var(--tf-blue);
}

body.dark-theme .platform-order-more {
    background: #1d2b45;
    border-color: #33456b;
    color: #9dbbff;
}

@media (max-width: 991.98px) {
    #new_order .platform-order-switcher {
        -webkit-overflow-scrolling: touch;
        padding: 0 16px 10px 0;
        scroll-padding-left: 2px;
    }

    #new_order .platform-order-chip {
        scroll-snap-align: start;
    }
}

body.dark-theme #new_order .platform-order-chip {
    background: #192235;
    border-color: #2b3850;
    color: #dbe3f0;
}

body.dark-theme #new_order .platform-order-chip.activeSocialMedia {
    background: #1d2b45;
    border-color: #9dbbff;
    color: #f5f7fb;
}

/* --------------------------------------------------------------------------
   20. Shared product polish
   -------------------------------------------------------------------------- */

html.tf-shell {
    scroll-padding-top: 100px;
    scrollbar-color: #a5b4c8 #f6f8fb;
}

@font-face {
    font-family: 'TF Inter';
    src: url('../fonts/inter-variable.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

body.tf-account {
    --body-font: 'TF Inter', Inter, Arial, sans-serif;
    --heading-font: 'TF Inter', Inter, Arial, sans-serif;
    --primary-color: #0961ed;
    --navbar-active: #0961ed;
    --btn-hover-bg: #064fc4;
    --primary-color-opacity-low: #eef4ff;
}
body.tf-account :is(h1, h2, h3, h4, h5, .cmn-btn, .card-title) { text-transform: none; }
.us-topbar button.us-icon-btn { background: transparent; border: 0; padding: 0; }
.us-topbar button.us-icon-btn:hover { background: rgba(255, 255, 255, .12); }

html.tf-shell ::selection { background: #cfe1ff; color: #10233f; }
html.tf-shell :is(input, textarea) { caret-color: var(--tf-blue); }
html.tf-shell :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid #3485ff;
    outline-offset: 3px;
}

body.tf-dialog-open { overflow: hidden; }
body.tf-dialog-open .tf-chat-toggle,
body:has(#cookiesAlert[style*="block"]) .tf-chat-toggle { visibility: hidden; }

.tf-account-main :is(.card, .row > *, .form-group) { min-width: 0; }
.tf-account-main :is(td, .alert, .invalid-feedback) { overflow-wrap: anywhere; }
.tf-account-main :is(.balance, .price, td) { font-variant-numeric: tabular-nums; }
.tf-account-main :is(input, textarea, select) { scroll-margin-block: 100px; }
.tf-account-main .table-responsive { overscroll-behavior-inline: contain; }
.tf-account-main :is(button, .cmn-btn):disabled { cursor: not-allowed; opacity: .6; }

.login-signup-form .form-label { color: var(--tf-ink); font-size: 14px; font-weight: 600; }
.login-signup-form .password-box { position: relative; }
.login-signup-form .password-box input { padding-inline-end: 52px; }
.login-signup-form :is(button.password-icon, button.confirm-password-icon) {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--tf-muted);
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    inset-inline-end: 4px;
}

html.tf-shell #cookiesAlert {
    border: 1px solid var(--tf-line);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(16, 35, 63, .16);
    max-height: min(55dvh, 380px);
    overflow-y: auto;
    padding: 20px;
    text-align: start;
    width: min(380px, calc(100vw - 32px));
}
html.tf-shell #cookiesAlert > img { display: none; }
html.tf-shell #cookiesAlert h4 { font-size: 18px; margin-top: 0 !important; }
html.tf-shell #cookiesAlert > span { font-size: 14px; line-height: 1.5; }
html.tf-shell #cookiesAlert .cookie-accept-btn {
    background: var(--tf-blue); border-color: var(--tf-blue); border-radius: 10px; color: #fff;
}
html.tf-shell #cookiesAlert :is(.cookie-accept-btn, .cookie-close-btn) { min-height: 44px; padding: 10px 20px; }

@media (max-width: 991.98px) {
    .is-marketplace-home .navbar > .container > .tfast-wordmark > span,
    .is-marketplace-home .navbar > .container > .tfast-wordmark strong { color: #fff !important; }
    .is-marketplace-home .navbar > .container > .tfast-wordmark small { color: #b8d3ff !important; }
    html.tf-shell #cookiesAlert {
        bottom: calc(var(--tf-tabbar-h) + var(--tf-safe-bottom) + 12px);
        left: 16px;
        right: auto;
    }
    .tf-account-main .account-settings-navbar .nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        gap: 8px;
    }
    .tf-account-main .account-settings-navbar .nav-item { flex-shrink: 0; }
    .tf-account-main .account-settings-navbar .nav-link { min-height: 44px; white-space: nowrap; }
    .is-auth-page .banner-section { padding: 20px 0 !important; min-height: 0; }
    .is-auth-page .banner-section-inner { padding: 0 !important; }
    .is-auth-page .banner-section .breadcrumb-area h3 { font-size: 26px !important; margin-bottom: 0; }
    .is-auth-page .banner-section .breadcrumb { display: none; }
    .is-auth-page .banner-section .breadcrumb { margin-bottom: 0; }
    .is-auth-page .login-signup-page { padding-block: 20px 32px; background-image: none !important; }
    .is-auth-page .login-signup-form { padding: 24px 20px; }
    .is-auth-page .login-signup-form .section-header { margin-bottom: 24px; }
    .is-auth-page .login-signup-form .section-header h3 { font-size: 24px; line-height: 1.3; }
    .is-auth-page .login-signup-form :is(input:not([type="checkbox"]):not([type="radio"]), select) { min-height: 48px; font-size: 16px; }
    .is-auth-page .login-signup-form .social-btn { min-height: 48px; }
    .is-auth-page .tf-chat-toggle { display: none !important; }
    .tf-account-main :is(.form-control, .form-select) { font-size: 16px; }
    .tf-account-main :is(.pagination .page-link, .dropdown-item) { min-height: 44px; }
}

@media (max-width: 399.98px) {
    .us-topbar #toggle-btnq { display: none; }
    .us-topbar .us-wallet { font-size: 11px; padding-inline: 8px; }
}

@media (min-width: 992px) {
    .us-topbar .tf-back-btn { display: none; }
    .is-marketplace-home .social-marketplace-home { padding-top: 84px; }
    .social-marketplace-home .sm-hero h1 span { color: #8dc5ff; }
    .tf-sheet { left: 50%; right: auto; width: min(480px, 90vw); transform: translate(-50%, 105%); }
    .tf-sheet.is-open { transform: translate(-50%, 0); }
}

body.dark-theme .tf-account-main { color-scheme: dark; }
body.dark-theme :is(.form-control, .form-select)::placeholder { color: #a8b8cf; }

/* Authentication is a focused, centered task rather than a marketing page. */
body.is-auth-page { background: #f6f8fb; }
.is-auth-page :is(.banner-section, .footer-section, .tf-pwa-banner, .tf-chat-toggle) { display: none !important; }
body.is-auth-page .login-signup-page {
    display: flex;
    align-items: center;
    min-height: calc(100svh - 84px);
    margin-top: 84px;
    padding: 32px 16px !important;
    background: #f6f8fb !important;
}
.is-auth-page .login-signup-page > .container { max-width: 520px; padding: 0; }
.is-auth-page .auth-registration > .container { max-width: 680px; }
.is-auth-page .login-signup-page > .container > .row,
.is-auth-page .login-signup-page-inner > .row { margin: 0; }
.is-auth-page .login-signup-page > .container > .row > div,
.is-auth-page .login-signup-page-inner > .row > div { flex: 0 0 100%; width: 100%; padding: 0; }
body.is-auth-page .login-signup-form { padding: 32px; box-shadow: 0 8px 28px rgba(16,35,63,.05); }
body.is-auth-page .login-signup-form .section-header { text-align: center; margin-bottom: 24px; }
body.is-auth-page .login-signup-form .section-header :is(h3, h4) { font-size: 28px; line-height: 1.25; margin-bottom: 10px; text-transform: none; }
.is-auth-page .login-signup-form .description { font-size: 15px; line-height: 1.5; }
.is-auth-page .login-signup-form .cmn-btn-group > .row { justify-content: center; }
.is-auth-page .login-signup-form .cmn-btn-group > .row > div { flex: 1 1 140px; max-width: 100%; }
.is-auth-page .login-signup-form hr.divider { margin: 28px 0 16px; }
.is-auth-page .login-signup-form .form-label { text-transform: none; }
.is-auth-page .login-signup-form :is(.form-control, .social-btn, button[type="submit"]) { min-height: 48px; }
.is-auth-page .login-signup-form .social-btn { justify-content: center; }
.is-auth-page .login-signup-form button[type="submit"] { color: #fff; box-shadow: none; }
.is-auth-page .login-signup-form button[type="submit"]:hover { background: #174dc5; }
@media (max-width: 991.98px) {
    body.is-auth-page .login-signup-page {
        min-height: calc(100svh - 84px - var(--tf-safe-top) - 76px - var(--tf-safe-bottom));
        margin-top: calc(84px + var(--tf-safe-top));
        padding: 20px 16px !important;
    }
    body.is-auth-page .login-signup-form { padding: 24px 20px; }
    body.is-auth-page .login-signup-form .section-header :is(h3, h4) { font-size: 24px; }
}

/* --------------------------------------------------------------------------
   21. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
    }

    html.tf-shell body.tf-enter {
        animation: none !important;
    }

    .tf-onboard-track,
    .tf-sheet,
    .modal .modal-dialog {
        transition: none !important;
    }
}
