/* Native dialogs use the site's palette independently of #sp-print-concept. */
html.sp-free-dialog-open {
    overflow: hidden;
    scrollbar-gutter: stable;
}

:is(#sp-order-dialog, #sp-enquiry-dialog).sp-free-dialog {
    color-scheme: light dark;
    --sp-dialog-surface: #fffcf7;
    --sp-dialog-paper: #f8f5ef;
    --sp-dialog-ink: #211e1b;
    --sp-dialog-muted: #625c55;
    --sp-dialog-line: #e0d8cc;
    --sp-dialog-accent: #bc0e23;
    --sp-dialog-wash: #f9e6e6;
    box-sizing: border-box;
    width: min(620px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--sp-dialog-line);
    border-radius: 15px;
    background: var(--sp-dialog-surface);
    color: var(--sp-dialog-ink);
    box-shadow: 0 24px 90px #120b0866;
    font: 400 16px/1.5 "SP Onest", Arial, sans-serif;
    text-align: left;
    overflow: hidden;
}

:is(#sp-order-dialog, #sp-enquiry-dialog):not([open]) { display: none; }
:is(#sp-order-dialog, #sp-enquiry-dialog)[open] { display: flex; flex-direction: column; }
:is(#sp-order-dialog, #sp-enquiry-dialog)::backdrop { background: rgb(22 16 13 / .72); backdrop-filter: blur(3px); }
.sp-free-dialog *, .sp-free-dialog *::before, .sp-free-dialog *::after { box-sizing: border-box; }
.sp-free-dialog [hidden] { display: none !important; }

.sp-free-dialog__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px 16px;
    border-bottom: 1px solid var(--sp-dialog-line);
    background: var(--sp-dialog-paper);
}
.sp-free-dialog__header :is(h1, h2, h3) {
    margin: 0;
    padding: 0;
    color: var(--sp-dialog-ink);
    font: 750 clamp(20px, 3vw, 24px)/1.25 "SP Onest", Arial, sans-serif;
}
.sp-free-dialog [data-sp-dialog-close] {
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sp-dialog-line);
    border-radius: 8px;
    background: var(--sp-dialog-surface);
    color: var(--sp-dialog-ink);
    font: 400 29px/1 Arial, sans-serif;
    cursor: pointer;
}
.sp-free-dialog [data-sp-dialog-close]:hover { border-color: var(--sp-dialog-accent); color: var(--sp-dialog-accent); }
.sp-free-dialog :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--sp-dialog-accent);
    outline-offset: 3px;
}
.sp-free-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    padding: 22px 24px 24px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.sp-free-dialog__notice {
    flex: 0 0 auto;
    max-height: min(25vh, 170px);
    margin: 16px 24px 0;
    padding: 12px 14px;
    border: 1px solid var(--sp-dialog-line);
    border-radius: 8px;
    background: var(--sp-dialog-paper);
    color: var(--sp-dialog-ink);
    font: 600 15px/1.45 "SP Onest", Arial, sans-serif;
    overflow: auto;
    overflow-wrap: anywhere;
}
.sp-free-dialog__notice--error {
    background: var(--sp-dialog-wash);
    border-color: var(--sp-dialog-accent);
    color: var(--sp-dialog-accent);
}

.sp-free-dialog .com-baforms-wrapper,
.sp-free-dialog form:is(.ba-form-1, .ba-form-2) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--sp-dialog-ink);
}
.sp-free-dialog .ba-form-html-field:has(.sp-free-form-heading) { display: none; }
.sp-free-dialog .ba-form-field-item:is(.sp-consent-value, .sp-sticker-types-value, .sp-types-value, .info_orders) {
    display: none !important;
}
:is(#sp-order-dialog, #sp-enquiry-dialog) .ba-input-label-wrapper,
.sp-free-dialog .sp-free-checkbox-row label,
.sp-free-dialog .sp-free-types legend { color: var(--sp-dialog-ink); }
.sp-free-dialog .sp-free-checkbox-row input { accent-color: #cb1026; }
.sp-free-dialog .sp-free-checkbox-row a { color: var(--sp-dialog-accent); text-decoration: underline; text-underline-offset: 3px; }
.sp-free-dialog .sp-free-consent-error { color: var(--sp-dialog-accent); }
:is(#sp-order-dialog, #sp-enquiry-dialog) .ba-input-wrapper :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
    --field-background-color: var(--sp-dialog-surface);
    --field-border-color: var(--sp-dialog-line);
    max-width: 100%;
    color: var(--sp-dialog-ink);
    background-color: var(--sp-dialog-surface);
    border-color: var(--sp-dialog-line);
    font-size: 16px;
}
:is(#sp-order-dialog, #sp-enquiry-dialog) .ba-input-wrapper :is(input, textarea)::placeholder { color: var(--sp-dialog-muted); opacity: 1; }
:is(#sp-order-dialog, #sp-enquiry-dialog) .ba-form-submit-btn {
    min-height: 46px;
    border-radius: 8px;
    background-color: #cb1026;
    color: #fff;
}
:is(#sp-order-dialog, #sp-enquiry-dialog) .ba-form-submit-btn:hover { background-color: #aa0a1d; }

@media (prefers-color-scheme: dark) {
    :is(#sp-order-dialog, #sp-enquiry-dialog).sp-free-dialog {
        --sp-dialog-surface: #2a2623;
        --sp-dialog-paper: #211e1c;
        --sp-dialog-ink: #fbf4e9;
        --sp-dialog-muted: #c6bcb1;
        --sp-dialog-line: #514943;
        --sp-dialog-accent: #ff8491;
        --sp-dialog-wash: #41262b;
    }
}

@media (max-width: 600px) {
    :is(#sp-order-dialog, #sp-enquiry-dialog).sp-free-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 12px;
    }
    .sp-free-dialog__header { padding: 12px 16px; gap: 12px; }
    .sp-free-dialog__body { padding: 18px 16px 20px; scrollbar-gutter: auto; }
    .sp-free-dialog__notice { margin: 12px 16px 0; }
    :is(#sp-order-dialog, #sp-enquiry-dialog) .ba-form-column { padding: 0 !important; }
}

@media (forced-colors: active) {
    .sp-free-dialog { border: 2px solid CanvasText; }
    .sp-free-dialog [data-sp-dialog-close], .sp-free-dialog .ba-form-submit-btn { border: 1px solid ButtonText; }
    :is(#sp-order-dialog, #sp-enquiry-dialog)::backdrop { background: rgb(0 0 0 / .7); }
}

/* Site-owned native file picker. The registered FREE link field stays hidden. */
.sp-free-dialog .ba-form-field-item.sp-file-upload-value { display: none !important; }
.sp-free-dialog .sp-free-upload {
    min-width: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    color: var(--sp-dialog-ink);
    font: inherit;
}
.sp-free-dialog .sp-free-upload__legend {
    float: none;
    width: auto;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    color: var(--sp-dialog-ink);
    font: 650 16px/1.45 "SP Onest", Arial, sans-serif;
}
.sp-free-dialog .sp-free-upload__optional { color: var(--sp-dialog-muted); font-weight: 400; }
.sp-free-dialog .sp-free-upload__choose {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    margin: 0;
    padding: 10px 16px;
    overflow: hidden;
    border: 1px solid var(--sp-dialog-accent);
    border-radius: 8px;
    background: var(--sp-dialog-surface);
    color: var(--sp-dialog-accent);
    font: 650 16px/1.3 "SP Onest", Arial, sans-serif;
    text-align: center;
    cursor: pointer;
}
.sp-free-dialog .sp-free-upload__choose:hover { background: var(--sp-dialog-wash); }
.sp-free-dialog .sp-free-upload__choose:focus-within {
    outline: 2px solid var(--sp-dialog-accent);
    outline-offset: 3px;
}
.sp-free-dialog .sp-free-upload__choose > input[type="file"] {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    font-size: 16px;
    cursor: inherit;
}
.sp-free-dialog .sp-free-upload__help,
.sp-free-dialog .sp-free-upload__status {
    margin: 8px 0 0;
    padding: 0;
    color: var(--sp-dialog-muted);
    font: 400 13px/1.5 "SP Onest", Arial, sans-serif;
    overflow-wrap: anywhere;
}
.sp-free-dialog .sp-free-upload__list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.sp-free-dialog .sp-free-upload__file {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--sp-dialog-line);
    border-radius: 8px;
    background: var(--sp-dialog-paper);
    list-style: none;
}
.sp-free-dialog .sp-free-upload__file-info { display: grid; gap: 3px; min-width: 0; }
.sp-free-dialog .sp-free-upload__file-name {
    color: var(--sp-dialog-ink);
    font: 550 14px/1.4 "SP Onest", Arial, sans-serif;
    overflow-wrap: anywhere;
}
.sp-free-dialog .sp-free-upload__file-size {
    color: var(--sp-dialog-muted);
    font: 400 12px/1.4 "SP Onest", Arial, sans-serif;
}
.sp-free-dialog .sp-free-upload__remove {
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--sp-dialog-line);
    border-radius: 6px;
    background: var(--sp-dialog-surface);
    color: var(--sp-dialog-accent);
    font: 550 13px/1.3 "SP Onest", Arial, sans-serif;
    cursor: pointer;
}
.sp-free-dialog .sp-free-upload__remove:hover { border-color: var(--sp-dialog-accent); }
.sp-free-dialog .sp-free-upload__error {
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--sp-dialog-accent);
    border-radius: 6px;
    background: var(--sp-dialog-wash);
    color: var(--sp-dialog-accent);
    font: 550 14px/1.45 "SP Onest", Arial, sans-serif;
    overflow-wrap: anywhere;
}
.sp-free-dialog .sp-free-upload[data-sp-upload-pending="true"] :is(.sp-free-upload__choose, .sp-free-upload__remove) {
    opacity: .65;
    cursor: wait;
}
@media (max-width: 420px) {
    .sp-free-dialog .sp-free-upload__file { gap: 6px; padding: 8px; }
    .sp-free-dialog .sp-free-upload__choose { width: 100%; }
}
@media (forced-colors: active) {
    .sp-free-dialog :is(.sp-free-upload__choose, .sp-free-upload__remove) { border: 1px solid ButtonText; }
    .sp-free-dialog .sp-free-upload__choose:focus-within { outline-color: Highlight; }
}
