/* RC50 isolated preview. Load after the existing product/free form styles.
 * Paint and geometry are confined to the existing #order input section.
 * Native fields, radio groups, checked/disabled states and submission stay intact.
 * Palette source: the approved R12 free-Manse input page. */
body.ssehada-r12 #order {
  --rc50-paper: #f6f2e9;
  --rc50-ink: #243b32;
  --rc50-deep: #273f35;
  --rc50-selected: #dce4c2;
  --rc50-card: #fcfaf4;
  --rc50-control: #fffdf7;
  --rc50-line: #8d9380;
  --rc50-muted: #5c6559;
}

/* Keep all inherited product/brand tokens outside the input area untouched. */
body.ssehada-r12 #order :is(.order-intro, .section-intro) {
  color: var(--rc50-muted);
  font-size: 14px;
  line-height: 1.85;
}
body.ssehada-r12 #order .order-form {
  background: var(--rc50-paper);
  border-color: var(--rc50-line);
  padding: 24px;
}
body.ssehada-r12 #order :is(.person-card, .couple-person-card) {
  background: var(--rc50-card);
  border: 1px solid var(--rc50-line);
  color: var(--rc50-ink);
  padding: 22px 20px;
}
body.ssehada-r12 #order .order-form :is(.person-card, .couple-person-card) {
  margin-top: 24px;
}
body.ssehada-r12 #order :is(.person-heading, .couple-contact) {
  color: var(--rc50-deep);
  border-color: var(--rc50-line);
}
body.ssehada-r12 #order .person-heading {
  margin-bottom: 22px;
}
body.ssehada-r12 #order :is(.person-heading small, .couple-person-title small) {
  color: var(--rc50-muted);
}
body.ssehada-r12 #order :is(.person-number, .couple-person-number) {
  background: var(--rc50-selected);
  color: var(--rc50-deep);
  border-color: var(--rc50-line);
}
body.ssehada-r12 #order .person-summary {
  background: #eff0e2;
  color: var(--rc50-ink);
  border-left-color: var(--rc50-deep);
}
body.ssehada-r12 #order :is(.field-grid, .field-grid2) {
  gap: 22px 16px;
}
body.ssehada-r12 #order .field-grid2 > .field {
  margin-top: 0;
}
body.ssehada-r12 #order .field > label,
body.ssehada-r12 #order .field > legend {
  color: var(--rc50-ink);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
  margin-bottom: 9px;
}
body.ssehada-r12 #order .field label small {
  color: var(--rc50-muted);
  font-size: 12px;
  font-weight: 400;
}
body.ssehada-r12 #order .field :is(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), select) {
  background: var(--rc50-control);
  border-color: var(--rc50-line);
  color: var(--rc50-ink);
  border-radius: 2px;
  min-height: 54px;
  padding: 13px 12px;
  font-size: 16px;
  line-height: 1.6;
}
body.ssehada-r12 #order .field input::placeholder {
  color: #737b6d;
  opacity: 1;
  font-weight: 400;
}
body.ssehada-r12 #order :is(.field-hint, .input-format-hint, .hint, .time-lock-status, .couple-contact-note) {
  color: var(--rc50-muted);
  font-size: 12px;
  line-height: 1.8;
  margin-top: 7px;
}

/* Clear, whole-label selection targets. No hidden radios or fake controls. */
body.ssehada-r12 #order .choice-row {
  gap: 8px;
  align-items: stretch;
}
body.ssehada-r12 #order .choice-row label {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid var(--rc50-line);
  border-radius: 2px;
  background: var(--rc50-control);
  color: var(--rc50-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}
body.ssehada-r12 #order .choice-row input[type="radio"] {
  appearance: auto;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--rc50-deep);
}
body.ssehada-r12 #order .choice-row label:has(input:checked) {
  background: var(--rc50-selected);
  color: var(--rc50-deep);
  border-color: var(--rc50-deep);
  box-shadow: inset 0 0 0 1px var(--rc50-deep);
  font-weight: 750;
}
body.ssehada-r12 #order .choice-row:has(input[type="radio"][name*="gender"]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body.ssehada-r12 #order .choice-row:has(input[type="radio"][name*="gender"]) label {
  min-height: 54px;
  padding: 12px;
  gap: 10px;
  font-size: 15px;
}
body.ssehada-r12 #order fieldset.field:has(input[type="radio"][name*="gender"]) {
  grid-column: 1 / -1;
}
/* Free forms formerly shared one narrow row between name and gender. */
body.ssehada-r12 #order #free-form .field:has(input[name="name"]),
body.ssehada-r12 #order #free-form .field:has(input[name$="_name"]) {
  grid-column: 1 / -1;
}
body.ssehada-r12 #order .choice-row:has(input[type="radio"][name*="calendar"]) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.ssehada-r12 #order .choice-row label:focus-within {
  outline: 2px solid var(--rc50-deep);
  outline-offset: 3px;
}
body.ssehada-r12 #order .field :is(input, select):focus-visible {
  outline: 2px solid var(--rc50-deep);
  outline-offset: 3px;
}
body.ssehada-r12 #order .unknown-time {
  min-height: 48px;
  padding: 8px 0;
  color: var(--rc50-ink);
  font-size: 13px;
  line-height: 1.7;
}
body.ssehada-r12 #order .unknown-time input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  accent-color: var(--rc50-deep);
}
body.ssehada-r12 #order .field :is(input:not([type="radio"]):not([type="checkbox"]), select):disabled,
body.ssehada-r12 #order .field input[readonly][aria-readonly="true"] {
  background: #e5e7dd;
  color: #636e5d;
  border-color: var(--rc50-line);
}
/* Preserve existing error message text, aria-invalid and hidden behavior. */
body.ssehada-r12 #order .field :is(input, select)[aria-invalid="true"] {
  border-color: #a83d4d;
}
body.ssehada-r12 #order .region-results {
  background: var(--rc50-control);
  border-color: var(--rc50-line);
}
body.ssehada-r12 #order .region-option {
  color: var(--rc50-ink);
}
body.ssehada-r12 #order .region-option:hover,
body.ssehada-r12 #order .region-option[aria-selected="true"] {
  background: var(--rc50-selected);
  color: var(--rc50-deep);
}

@media (max-width: 600px) {
  body.ssehada-r12 #order .order-form {
    padding: 18px;
  }
  body.ssehada-r12 #order :is(.person-card, .couple-person-card) {
    padding: 20px 14px;
  }
  body.ssehada-r12 #order :is(.field-grid, .field-grid2) {
    gap: 21px 12px;
  }
  body.ssehada-r12 #order .choice-row:has(input[type="radio"][name*="calendar"]) label {
    padding: 10px 4px;
    gap: 4px;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  body.ssehada-r12 #order .order-form {
    padding: 15px;
  }
  body.ssehada-r12 #order :is(.person-card, .couple-person-card) {
    padding-right: 11px;
    padding-left: 11px;
  }
  body.ssehada-r12 #order .choice-row:has(input[type="radio"][name*="calendar"]) {
    gap: 5px;
  }
}
