/* Frostella OS 3.7.0.2 — Responsive & Mobile Hardening */
:root {
    --fr-responsive-vh: 100dvh;
    --fr-responsive-gutter: 12px;
    --fr-responsive-control-height: 46px;
}

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

body {
    max-width: 100%;
}

@supports (overflow: clip) {
    body {
        overflow-x: clip;
    }
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
}

main,
section,
article,
aside,
header,
footer,
nav,
form,
fieldset,
.fr-page,
.fr-container,
.fr-card,
.fr-section,
.fr-field,
.field,
[class*="-field"],
[class*="-cell"],
[class*="-card"] {
    min-width: 0;
}

fieldset {
    width: 100%;
    max-width: 100%;
}

form > *,
fieldset > *,
.row > *,
[class*="-grid"] > *,
[class*="-fields"] > *,
[class*="-row"] > * {
    min-width: 0;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea,
.fr-input,
.fr-select,
.fr-textarea,
.form-control,
.form-select,
.fr-native-control {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

textarea {
    overflow-wrap: anywhere;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: var(--fr-responsive-control-height);
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.2;
    text-align: left;
    direction: ltr;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value,
input[type="week"]::-webkit-date-and-time-value {
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit,
input[type="week"]::-webkit-datetime-edit {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    margin: 0 0 0 .45rem;
    padding: 0;
    cursor: pointer;
}

.fr-native-date-field,
.fr-control-field,
.fr-control-layout {
    min-width: 0 !important;
    max-width: 100%;
}

.fr-responsive-table,
.fr-table-wrap,
.table-responsive,
[class*="table-wrap"],
[class*="table-scroll"] {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.fr-responsive-table > table,
.fr-table-wrap > table,
.table-responsive > table,
[class*="table-wrap"] > table,
[class*="table-scroll"] > table {
    margin-bottom: 0;
}

th,
td,
.fr-card,
.fr-section,
[class*="-card"],
[class*="-copy"] {
    overflow-wrap: anywhere;
}

pre,
code,
.fr-code,
[class*="-code"] {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

dialog {
    max-width: calc(100vw - 24px);
    max-height: calc(var(--fr-responsive-vh, 100dvh) - 24px);
}

[class$="-modal-card"],
[class$="-modal-shell"],
[class$="-dialog"] {
    max-width: calc(100vw - 24px);
}

.fr-location-modal-shell,
.bs-modal,
.mcv1-modal-card,
.bundle-cart-dialog,
.bundle-confirm-dialog,
.ca-submit-overlay-card {
    max-height: calc(var(--fr-responsive-vh, 100dvh) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ox-footer,
.rf-wizard-footer,
.bundle-experience .actions,
.wpo-checkout-bar,
.cp-actions {
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
}

.fr-runtime-notice,
.station-toast,
.more-orders-cue {
    max-width: calc(100vw - 24px);
}

/* Module workspaces remain useful tabs, but stop floating over forms on
   tablets and phones. Desktop keeps the sticky command-bar behavior. */
@media (max-width: 1100px) {
    .ow-workspace:not(.ow-standalone),
    .cw-workspace:not(.cw-standalone),
    .ctw-workspace:not(.ctw-standalone),
    .fw-workspace:not(.fw-standalone),
    .mw-workspace:not(.mw-standalone),
    .sw-workspace {
        position: relative !important;
        top: auto !important;
        z-index: 30 !important;
    }

    .ow-workspace-links,
    .cw-workspace-links,
    .ctw-workspace-links,
    .fw-workspace-links,
    .mw-workspace-links,
    .sw-links {
        scroll-padding-inline: 12px;
        overscroll-behavior-inline: contain;
    }

    .fr-nav-dropdown,
    .cw-product-menu,
    .ctw-customer-menu {
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 760px) {
    :root {
        --fr-responsive-control-height: 48px;
    }

    .fr-page {
        padding-top: 20px;
        padding-bottom: calc(38px + env(safe-area-inset-bottom));
    }

    .fr-container {
        width: min(100% - 24px, 1120px);
    }

    .fr-card,
    .fr-section {
        padding: 16px;
        border-radius: 16px;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    textarea,
    .fr-input,
    .fr-select,
    .fr-textarea,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }

    .fr-date-grid-parent {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .fr-date-grid-parent > *,
    .fr-native-date-field {
        grid-column: auto !important;
    }

    form[class*="-grid"],
    form [class*="-form-grid"],
    form [class$="-fields"],
    form [class*="-fields "],
    form .edit-fields {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .fr-form-actions,
    .form-actions,
    .dialog-actions,
    .modal-actions,
    .ec-filter-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .fr-form-actions > *,
    .form-actions > *,
    .dialog-actions > *,
    .modal-actions > * {
        min-width: 0;
    }

    .fr-table-wrap,
    .table-responsive,
    [class*="table-wrap"],
    [class*="table-scroll"],
    .fr-responsive-table {
        scrollbar-width: thin;
    }

    .fr-help::after,
    [role="tooltip"] {
        max-width: calc(100vw - 24px) !important;
    }

    .fr-location-modal,
    .bs-modal-layer,
    .mcv1-modal,
    .bundle-cart-layer,
    .bundle-confirm-layer,
    .ca-submit-overlay {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .fr-card,
    .fr-section {
        padding: 14px;
    }

    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="week"] {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .fr-btn,
    button,
    input[type="submit"],
    input[type="button"] {
        touch-action: manipulation;
    }

    .fr-filter-actions,
    .ec-filter-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
        min-width: 0;
    }

    .fr-filter-actions > *,
    .ec-filter-actions > * {
        width: 100%;
    }
}

@media print {
    .fr-responsive-only,
    .fr-mobile-overflow-notice {
        display: none !important;
    }

    body {
        overflow: visible !important;
    }
}


/* ================================================================
   Frostella OS 3.7.0.3 — Mobile Compact & Readability Polish
================================================================ */
html {
    scroll-padding-top: 88px;
}

h1,
h2,
h3,
[id] {
    scroll-margin-top: 96px;
}

/* Numeric mobile date/time facade. The native control remains on top and
   keeps the browser picker, validation, name, value, and submission logic. */
.fr-date-proxy {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.fr-date-proxy-input {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

.fr-date-proxy-display {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    display: flex !important;
    align-items: center;
    padding-right: 2.65rem !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: left;
    pointer-events: none;
}

.fr-date-proxy-display::after {
    content: "▣";
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: currentColor;
    opacity: .58;
    font-size: .9em;
}

.fr-date-proxy-input:focus + .fr-date-proxy-display {
    outline: 2px solid rgba(211,174,94,.52) !important;
    outline-offset: 2px;
}

.fr-date-proxy.is-disabled {
    opacity: .62;
}

/* Mobile report tables become readable cards instead of forcing the whole
   page sideways. Tables that contain editable controls are intentionally
   left alone. */
@media (max-width: 760px) {
    table.fr-mobile-card-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    table.fr-mobile-card-table thead {
        display: none !important;
    }

    table.fr-mobile-card-table tbody,
    table.fr-mobile-card-table tr {
        display: block !important;
        width: 100% !important;
    }

    table.fr-mobile-card-table tr {
        margin: 0 0 12px !important;
        padding: 12px 14px !important;
        border: 1px solid rgba(255,255,255,.10) !important;
        border-radius: 15px !important;
        background: rgba(255,255,255,.025) !important;
    }

    table.fr-mobile-card-table td {
        display: grid !important;
        grid-template-columns: minmax(105px,.78fr) minmax(0,1.22fr) !important;
        gap: 10px !important;
        align-items: start !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 9px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,.07) !important;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    table.fr-mobile-card-table td:last-child {
        border-bottom: 0 !important;
    }

    table.fr-mobile-card-table td::before {
        content: attr(data-fr-label);
        color: rgba(255,255,255,.58);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .045em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    table.fr-mobile-card-table td[colspan] {
        display: block !important;
        text-align: center !important;
    }

    table.fr-mobile-card-table td[colspan]::before {
        display: none !important;
    }

    /* Intelligence/card headings: title first, action below. This fixes
       clipped Open report / Open plan links on narrow screens. */
    .fd-card-head,
    .ba-card-head,
    .ba-brief-head,
    .ed-card-head,
    .eb-card-head,
    .pi-card-head,
    .ri-card-head,
    .pu-card-head,
    .bp-card-head,
    .cf-card-head,
    .mi-card-head,
    .ci-card-head,
    .cra-card-head,
    .ml-section-head,
    .st-history-head,
    .sh-card-head {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        align-items: start !important;
        justify-content: stretch !important;
        gap: 9px !important;
    }

    .fd-card-link,
    .ba-card-link,
    .ba-action-link,
    .ed-card-link,
    .eb-card-link,
    .pi-card-link,
    .ri-product-link,
    .pu-card-link,
    .mi-card-link,
    .ci-card-link,
    .cra-card-link,
    .ml-section-head > a,
    .st-history-head > a {
        max-width: 100% !important;
        justify-self: start !important;
        align-self: start !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        line-height: 1.35 !important;
    }

    .ba-action-top,
    .ed-alert-top,
    .ed-decision-head,
    .ed-decision-actions,
    .ri-product-head,
    .ri-ingredient-head,
    .pu-readiness,
    .sh-score-top,
    .fd-health-top,
    .ed-score-top,
    .cf-score-top,
    .ml-score-top {
        flex-wrap: wrap !important;
        min-width: 0 !important;
    }

    .ed-decision-actions {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        justify-items: start !important;
    }

    /* Preserve true circles instead of allowing flexbox to squash them. */
    .fd-health-ring,
    .sh-ring,
    .ed-score-ring,
    .cf-score-ring,
    .ml-score-ring,
    .pu-readiness-ring {
        display: grid !important;
        flex: 0 0 76px !important;
        width: 76px !important;
        height: 76px !important;
        min-width: 76px !important;
        min-height: 76px !important;
        max-width: 76px !important;
        max-height: 76px !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 50% !important;
    }

    .fd-health-ring::before,
    .sh-ring::before,
    .ed-score-ring::before,
    .cf-score-ring::before,
    .ml-score-ring::before,
    .pu-readiness-ring::before {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
        border-radius: 50% !important;
    }

    /* More compact, readable report typography. */
    .fd-title,
    .ba-title,
    .ed-title,
    .eb-title,
    .pi-title,
    .ri-title,
    .pu-title,
    .bp-title,
    .cf-title,
    .ml-title,
    .mi-title,
    .ci-title,
    .cra-title,
    .sh-title,
    .fr-page-title {
        max-width: 100% !important;
        font-size: clamp(28px,9vw,40px) !important;
        line-height: 1.05 !important;
        letter-spacing: -.035em !important;
        overflow-wrap: anywhere !important;
    }

    .fd-card h2,
    .ba-card h2,
    .ed-card h2,
    .eb-card h2,
    .pi-card h2,
    .ri-card h2,
    .pu-card h2,
    .bp-card h2,
    .cf-card h2,
    .mi-card h2,
    .ci-card h2,
    .cra-card h2,
    .ml-section h2,
    .sh-card h2,
    .bi-panel-title,
    .st-history-title {
        max-width: 100% !important;
        font-size: clamp(20px,6.2vw,28px) !important;
        line-height: 1.15 !important;
        overflow-wrap: anywhere !important;
    }

    .fd-card,
    .ba-card,
    .ed-card,
    .eb-card,
    .pi-card,
    .ri-card,
    .pu-card,
    .bp-card,
    .cf-card,
    .mi-card,
    .ci-card,
    .cra-card,
    .ml-section,
    .sh-card,
    .bi-panel,
    .sp-panel,
    .st-card {
        max-width: 100% !important;
        overflow: hidden;
    }
}

@media (max-width: 430px) {
    .fd-health-ring,
    .sh-ring,
    .ed-score-ring,
    .cf-score-ring,
    .ml-score-ring,
    .pu-readiness-ring {
        display: grid !important;
        flex-basis: 68px !important;
        width: 68px !important;
        height: 68px !important;
        min-width: 68px !important;
        min-height: 68px !important;
        max-width: 68px !important;
        max-height: 68px !important;
    }

    .fd-health-ring::before,
    .sh-ring::before,
    .ed-score-ring::before,
    .cf-score-ring::before,
    .ml-score-ring::before,
    .pu-readiness-ring::before {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        min-height: 50px !important;
    }
}
