/* --- Order form (neutral / white UI) --- */
section.container:has(> .ui-card.order-form) {
    padding-top: 0;
    background: #fff;
}

.ui-card.order-form {
    padding: 0;
    border: none;
    background: #fff;
    /* Form field tokens — align with ui/inputs/common.css :root variables */
    --of-input-surface: var(--input-field-bg, #ffffff);
    --of-input-border: var(--input-border-color);
}

.order-form #multi-step-form {
    background: #fff;
}

.order-form__intro {
    padding: 20px 16px 8px;
    background: #fff;
}

.order-form__step-num {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    color: #999;
}

.order-form__heading {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.25;
    color: #1a1a1a;
}

.order-form__body {
    padding: 8px 16px 28px;
    background: #fff;
}

.order-form__section-heading {
    margin: 32px 0 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.order-form__body > .order-form__section-heading:first-child {
    margin-top: 0;
}

.order-form__section-sub {
    margin: -4px 0 10px 0;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    line-height: 1.4;
}

.order-form__delivery-toggle {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 12px 0 20px 0;
}

.order-form__delivery-btn {
    flex: 1;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.order-form__delivery-btn:hover {
    border-color: #999;
}

.order-form__delivery-btn:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

.order-form__delivery-btn--active {
    color: #fff;
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.order-form__recipient-delivery {
    margin-bottom: 4px;
}

.order-form__recipient-delivery[hidden] {
    display: none !important;
}

.order-form__label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--input-label-color, #34495e);
    font-weight: 500;
}

.input-component__label--sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.order-form__field-group {
    margin-bottom: 2px;
}

.order-form__stack--letter,
.order-form__stack--contact,
.order-form__stack--delivery {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.order-form__stack--delivery > .form-row {
    margin-bottom: 0;
}

.order-form__message-block {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.order-form__message-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-form__message-head .order-form__label {
    margin-bottom: 0;
}

.order-form__message-head .message-body__char-count {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #bbb;
    flex-shrink: 0;
}

#message-body,
.order-form .input-component__field--letter-body {
    display: block;
    resize: none;
    overflow-y: auto;
    min-height: 170px;
    line-height: 1.5;
}

.order-form__tip {
    margin: 24px 0 0 0;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
}

.order-form__tip-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #777;
}

.order-form__tip-lead {
    color: #444;
    font-weight: 500;
}

.order-form__divider {
    height: 1px;
    background: #eee;
    margin: 24px 0;
    border: none;
}

.order-form .input-component--checkbox-scented {
    margin-top: 2px;
    margin-bottom: 0;
}

.order-form__checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    -webkit-tap-highlight-color: transparent;
}

.order-form__checkbox-label .input-component__checkbox-text-stack,
.order-form__checkbox-label .input-component__checkbox-help {
    display: none;
}

.order-form .input-component--checkbox .input-component__checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.order-form .input-component--checkbox .input-component__checkbox-box {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    background: #fff;
    position: relative;
}

.order-form .input-component--checkbox .input-component__checkbox:checked + .input-component__checkbox-box {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.order-form .input-component--checkbox .input-component__checkbox:checked + .input-component__checkbox-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.order-form .input-component--checkbox .input-component__checkbox:focus-visible + .input-component__checkbox-box {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

.order-form__charset-note {
    font-size: 12px;
    font-weight: 400;
    color: #bbb;
    margin: 12px 0 0 0;
    line-height: 1.5;
}

.order-form__legal-note {
    font-size: 12px;
    font-weight: 400;
    color: #bbb;
    text-align: center;
    margin: 16px 0 12px;
    line-height: 1.5;
}

.order-form__legal-note a {
    color: #888;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- Scoped field overrides (order form only) --- */
.order-form .recipient-row .input-component,
.order-form .order-form__stack .input-component,
.order-form .form-row .input-component {
    margin-bottom: 0;
}

.order-form .input-component__label {
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--input-label-color, #34495e);
    font-weight: 500;
}

.order-form .input-component__field {
    background: var(--of-input-surface);
    border: var(--input-border-width, 1px) solid var(--of-input-border);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
    min-height: 48px;
    box-sizing: border-box;
    transition: border-width 0.15s ease, border-color 0.15s ease;
}

.order-form .input-component--textarea .input-component__field {
    min-height: 170px;
    padding: 13px 16px;
}

.order-form .input-component--dropdown-text .dropdown-text__combined {
    background: var(--of-input-surface);
    border: var(--input-border-width, 1px) solid var(--of-input-border);
    transition: border-width 0.15s ease, border-color 0.15s ease;
}

/* Recipient title + name: one surface — no inner “card” or second focus ring (outer .dropdown-text__combined handles focus/error). */
.order-form .input-component--dropdown-text .dropdown-text__segment--text .input-component__field {
    background: transparent;
    border-radius: 0 12px 12px 0;
}

.order-form .input-component__field::placeholder {
    font-size: 15px;
    font-weight: 400;
    color: #aaa;
}

/* Match autofill to the same surface as normal fields (ui/styles/global.css uses white inset for --bg-color). */
.order-form .input-component__field:-webkit-autofill,
.order-form .input-component__field:-webkit-autofill:hover,
.order-form .input-component__field:-webkit-autofill:active {
    -webkit-text-fill-color: #1a1a1a;
    caret-color: #1a1a1a;
    -webkit-box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
    box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.order-form .input-component__field:-webkit-autofill:focus {
    -webkit-text-fill-color: #1a1a1a;
    caret-color: #1a1a1a;
    -webkit-box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
    box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
}

.order-form .input-component__field.has-error:-webkit-autofill,
.order-form .input-component__field.has-error:-webkit-autofill:hover,
.order-form .input-component__field.has-error:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
    box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
}

.order-form .input-component__field.has-error:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
    box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
}

.order-form .input-component--dropdown-text .dropdown-text__segment--text .input-component__field:-webkit-autofill:focus,
.order-form .input-component--dropdown-text .dropdown-text__segment--text .input-component__field.has-error:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
    box-shadow: 0 0 0 1000px var(--of-input-surface) inset !important;
}

.order-form .input-component__field:-moz-autofill {
    background-color: var(--of-input-surface) !important;
    color: #1a1a1a !important;
}

.order-form .input-component__field:focus {
    outline: none;
    box-shadow: none;
    border-width: var(--input-focus-border-width, 2px);
    border-color: var(--input-focus-border-color, #000000);
}

.order-form .input-component__field.has-error:focus {
    border-color: var(--input-error-border-color, #c5221f);
}

.order-form .input-component--dropdown-text .dropdown-text__segment--text .input-component__field:focus,
.order-form .input-component--dropdown-text .dropdown-text__segment--text .input-component__field:focus-visible {
    outline: none;
    box-shadow: none;
}

.order-form .input-component__field.has-error {
    border-width: var(--input-focus-border-width, 2px);
    border-color: var(--input-error-border-color, #c5221f);
    box-shadow: none;
}

.order-form .input-component--dropdown-text .dropdown-text__segment--text .input-component__field.has-error {
    box-shadow: none;
}

.order-form .input-component--dropdown .dropdown-input__trigger {
    background: var(--of-input-surface);
    border: var(--input-border-width, 1px) solid var(--of-input-border);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
    min-height: 48px;
    transition: border-width 0.15s ease, border-color 0.15s ease;
}

.order-form .input-component--dropdown-text .dropdown-input__trigger {
    background: transparent;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 13px 12px 13px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
    min-height: 48px;
}

.order-form .input-component--dropdown-text .dropdown-input__trigger:focus,
.order-form .input-component--dropdown-text .dropdown-input__trigger:focus-visible {
    outline: none;
    box-shadow: none;
}

.order-form .dropdown-input__option {
    font-size: 15px;
    font-weight: 400;
}

.order-form .input-component--dropdown .dropdown-input__trigger[data-placeholder="true"] .dropdown-input__value,
.order-form .input-component--dropdown-text .dropdown-input__trigger[data-placeholder="true"] .dropdown-input__value {
    color: #aaa;
}

.order-form .input-component--dropdown .dropdown-input__list,
.order-form .input-component--dropdown-text .dropdown-input__list {
    border-color: var(--of-input-border);
    border-radius: 0 0 12px 12px;
}

.order-form .input-component--dropdown .dropdown-input__trigger[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.order-form .input-component--dropdown-text .dropdown-text__segment--dropdown .dropdown-input__trigger[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.order-form .input-component--dropdown .dropdown-input__trigger.has-error,
.order-form .input-component--dropdown.input-component--error .dropdown-input__trigger {
    border-width: var(--input-focus-border-width, 2px);
    border-color: var(--input-error-border-color, #c5221f);
    box-shadow: none;
}

.order-form .input-component--dropdown-text .dropdown-input__trigger.has-error,
.order-form .input-component--dropdown-text.input-component--error .dropdown-input__trigger {
    box-shadow: none;
}

.order-form .input-component--dropdown-text.input-component--error .dropdown-text__combined {
    border-width: var(--input-focus-border-width, 2px);
    border-color: var(--input-error-border-color, #c5221f);
    box-shadow: none;
}

.order-form .input-component--dropdown-text .dropdown-text__combined:focus-within {
    border-width: var(--input-focus-border-width, 2px);
    border-color: var(--input-focus-border-color, #000000);
    box-shadow: none;
}

.order-form .input-component--dropdown-text.input-component--error .dropdown-text__combined:focus-within {
    border-color: var(--input-error-border-color, #c5221f);
    box-shadow: none;
}

.form-row--city-state {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    align-items: start;
}

@media (max-width: 399px) {
    .form-row--city-state {
        grid-template-columns: 1fr;
    }
}

.form-row--pin {
    display: flex;
    justify-content: flex-start;
}

.form-row--pin .pin-code-field {
    width: 40%;
    max-width: 12rem;
    min-width: 0;
}

@media (max-width: 399px) {
    .form-row--pin .pin-code-field {
        width: 100%;
        max-width: none;
    }
}

.form-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.order-form .form-actions--step-1 {
    flex-direction: column;
    align-items: stretch;
    margin-top: 20px;
}

.order-form .form-actions--step-2 {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 16px;
}

.order-form .order-form__btn-primary {
    background: #1a1a1a;
    color: #fff;
    border-radius: 50px;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    min-height: 52px;
    box-sizing: border-box;
}

.order-form .order-form__btn-primary:hover {
    background: #333;
}

.order-form .order-form__btn-primary--full {
    width: 100%;
    justify-content: center;
}

.order-form .form-actions--step-2 .order-form__btn-primary,
.order-form .form-actions--step-2 .order-form__btn-secondary {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.order-form .order-form__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    border-radius: 50px;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    min-height: 52px;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.order-form .order-form__btn-secondary:hover {
    background: #fafafa;
}

.order-form .order-form__btn-secondary:active {
    background: #f0f0f0;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.35s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

