/* Order panel (plan 2026-10-04 order mode; redesigned 2026-10-04). Uses the design tokens loaded by templates.css. */
.order-block > h2 { font-size: 25px; margin-bottom: 16px; }
.order-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.order-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.order-form legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.order-form p { margin: 0; }

/* The site styles every non-checkbox input as a full-width text box; radios and the search box are reset here. */
.order-form input[type=radio], .order-form input[type=checkbox] { display: inline-block; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--ink); }

/* Choice cards */
.order-scope { display: grid; gap: 8px; }
.order-option { display: grid; grid-template-columns: 18px 1fr auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; }
.order-option:hover { border-color: var(--muted); }
.order-option:has(input:checked) { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.order-option:has(input:focus-visible) { outline: 3px solid var(--clay); outline-offset: 2px; }
.order-option-title { font-weight: 600; font-size: 15px; }
.order-option-price { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.order-option-price .price-value { font: 20px/1.2 var(--serif); }
.order-option-note { grid-column: 2 / -1; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* State picker: shown only while "Choose states" is selected */
.order-form:not(:has(input[name=scope][value=states]:checked)) .order-states { display: none; }
.order-states { display: grid; gap: 10px; }
.order-state-set legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.order-form .order-state-search { min-height: 40px; padding: 8px 12px; font-size: 14px; margin-bottom: 8px; }
.order-state-list { list-style: none; margin: 0; padding: 4px; max-height: 248px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); overscroll-behavior: contain; }
.order-state-list li[hidden] { display: none; }
.order-state-list label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.order-state-list label:hover { background: var(--sage); }
.order-state-list label:has(input:checked) { background: var(--lime); }
.order-state-list label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.order-state-name { flex: 1; min-width: 0; }
.order-state-list .price-value { font-size: 13px; color: var(--muted); }
.order-picked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.order-picked:empty { display: none; }
.order-picked-count { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.order-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 100px; background: var(--lime); font-size: 13px; }
.order-chip::after { content: '×'; font-size: 16px; line-height: 1; }
.order-chip:hover { background: var(--surface); }
.order-hint { color: #923c26; }

/* Total, terms, submit */
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; }
.order-total .price-value { font: 28px/1.2 var(--serif); }
.order-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.order-agree input { margin-top: 2px !important; }
.order-form > .button { width: 100%; }
.order-promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; }
.order-promises li { position: relative; padding-left: 20px; }
.order-promises li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 9px; height: 5px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.order-form > .help { font-size: 12px; line-height: 1.45; }
.order-option-price .price-value { color: var(--ink); margin-left: 4px; }
@media (min-width: 901px) { .commerce-aside:has(.order-block) { max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } }
