/* OPERA native forms (opera-forms.js): NHS design system look, as on OPERA+ forms. */
.opf {
  font-family: "Frutiger W01", Arial, sans-serif;
  color: #212b32;
  font-size: 16px;
  line-height: 24px;
  max-width: 720px;
  padding: 8px 0 48px;
}
@media (min-width: 641px) { .opf { font-size: 19px; line-height: 28px; } }

.opf [hidden] { display: none !important; }

.opf-title { font-size: 32px; line-height: 40px; font-weight: 600; margin: 0 0 8px; color: #212b32; }
@media (min-width: 641px) { .opf-title { font-size: 48px; line-height: 56px; } }
.opf-lede { color: #4c6272; margin: 0 0 8px; }
.opf-progress { color: #4c6272; font-size: 16px; margin: 0 0 24px; }

.opf-group { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
@media (min-width: 641px) { .opf-group { margin-bottom: 32px; } }
.opf-group--error { border-left: 4px solid #d5281b; padding-left: 16px; }
.opf-label { display: block; font-weight: 600; margin: 0 0 8px; padding: 0; color: #212b32; }
.opf-required { color: #d5281b; }
.opf-hint { color: #4c6272; margin: 0 0 8px; }
.opf-error-message { display: block; color: #d5281b; font-weight: 600; margin: 0 0 8px; }
.opf-sublabel { display: block; font-size: 16px; color: #4c6272; margin: 0 0 4px; }

.opf-input, .opf-select, .opf-textarea {
  font: inherit;
  font-size: 16px;
  color: #212b32;
  background: #fff;
  border: 2px solid #4c6272;
  border-radius: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  padding: 4px 8px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.opf-select { appearance: auto; -webkit-appearance: menulist; width: auto; min-width: 50%; }
.opf-textarea { min-height: 120px; resize: vertical; }
.opf-input--short { width: auto; min-width: 12em; }
.opf-input[readonly] { background: #f0f4f5; }
.opf-group--error .opf-input, .opf-group--error .opf-select, .opf-group--error .opf-textarea { border-color: #d5281b; }
.opf-input:focus, .opf-select:focus, .opf-textarea:focus {
  outline: 4px solid #ffeb3b;
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px #212b32;
  border-color: #212b32;
}

.opf-parts { display: flex; flex-wrap: wrap; gap: 16px; }
.opf-part { flex: 1 1 100%; }
.opf-part--inline { flex: 1 1 14em; }

.opf-choice { position: relative; display: block; min-height: 40px; margin: 0 0 8px; padding: 0 0 0 52px; clear: left; }
.opf-choice__input { position: absolute; z-index: 1; top: 0; left: 0; width: 40px; height: 40px; margin: 0; cursor: pointer; opacity: 0; }
.opf-choice__label { display: inline-block; padding: 8px 12px 4px 0; cursor: pointer; touch-action: manipulation; }
.opf-choice__label::before {
  content: ""; box-sizing: border-box; position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border: 2px solid #4c6272; background: #fff;
}
.opf-radios .opf-choice__label::before { border-radius: 50%; }
.opf-radios .opf-choice__label::after {
  content: ""; position: absolute; top: 10px; left: 10px; width: 0; height: 0;
  border: 10px solid #212b32; border-radius: 50%; opacity: 0;
}
.opf-checkboxes .opf-choice__label::after {
  content: ""; box-sizing: border-box; position: absolute; top: 11px; left: 9px; width: 23px; height: 12px;
  transform: rotate(-45deg); border: solid #212b32; border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent;
}
.opf-choice__input:checked + .opf-choice__label::after { opacity: 1; }
.opf-choice__input:focus + .opf-choice__label::before { border: 4px solid #212b32; box-shadow: 0 0 0 4px #ffeb3b; }
.opf-choice--all { border-bottom: 1px solid #d8dde0; padding-bottom: 8px; margin-bottom: 16px; }
.opf-choices--columns { columns: 2; column-gap: 24px; }
.opf-choices--columns .opf-choice { break-inside: avoid; }
@media (max-width: 640px) { .opf-choices--columns { columns: 1; } }
.opf-choice__other { display: block; margin-top: 8px; max-width: 24em; }

.opf-text { margin: 0 0 24px; }
.opf-text * { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; text-align: left !important; }
.opf-text p { margin: 0 0 16px; }
.opf-image { display: block; max-width: 100%; height: auto; margin: 0 0 16px; }
.opf-divider { border: 0; border-top: 1px solid #d8dde0; margin: 32px 0; }

.opf-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.opf-button {
  font: inherit; font-weight: 600; font-size: 19px; line-height: 1;
  color: #fff; background: #007f3b; border: 2px solid transparent; border-radius: 4px;
  box-shadow: 0 4px 0 #00401e; padding: 12px 16px; cursor: pointer; margin: 0 0 4px;
}
.opf-button:hover { background: #00662f; }
.opf-button:focus { outline: 4px solid transparent; background: #ffeb3b; color: #212b32; box-shadow: 0 4px 0 #212b32; }
.opf-button--secondary { background: #4c6272; box-shadow: 0 4px 0 #263139; }
.opf-button--secondary:hover { background: #384853; }
.opf-button[disabled] { opacity: .6; cursor: default; }
.opf-cancel { color: #005eb8; font-size: 19px; }

.opf-error-summary { border: 4px solid #d5281b; padding: 16px; margin: 0 0 32px; background: #fff; }
.opf-error-summary:focus { outline: 4px solid #ffeb3b; }
.opf-error-summary__title { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0 0 16px; }
.opf-error-summary__list { margin: 0; padding: 0; list-style: none; }
.opf-error-summary__list a { color: #d5281b; font-weight: 600; }

.opf-panel { border: 0; padding: 24px; background: #fff; margin: 0 0 32px; }
.opf-panel--success { border-left: 8px solid #007f3b; }
.opf-panel__text { margin: 0 0 24px; }
.opf-panel__title { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0 0 8px; }
.opf-panel:focus { outline: 4px solid #ffeb3b; }

/* --- Step line (OPERA+ style: numbered blobs joined by short rules) --- */
.opf-steps { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: 14px; line-height: 20px; }
.opf-step { display: flex; align-items: center; }
.opf-step + .opf-step::before { content: ""; display: inline-block; width: 16px; height: 1px; background: #aeb7bd; margin: 0 8px; }
.opf-step__link { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; background: none; border: 0; padding: 0; color: #4c6272; }
button.opf-step__link { cursor: pointer; }
button.opf-step__link:hover .opf-step__label { text-decoration: underline; }
button.opf-step__link:focus { outline: 4px solid #ffeb3b; outline-offset: 2px; }
.opf-step__num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 600; background: #d8dde0; color: #4c6272; flex: none; }
.opf-step--done .opf-step__link { color: #007f3b; }
.opf-step--done .opf-step__num { background: #007f3b; color: #fff; }
.opf-step--current .opf-step__link { color: #005eb8; }
.opf-step--current .opf-step__num { background: #005eb8; color: #fff; }

/* --- Check answers --- */
.opf-review__title { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0 0 16px; }
.opf-review__section { margin: 0 0 24px; }
.opf-review__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid #d8dde0; margin-bottom: 8px; }
.opf-review__head h3 { font-size: 19px; line-height: 28px; font-weight: 600; margin: 0 0 4px; }
.opf-review__change { font: inherit; font-size: 16px; color: #005eb8; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.opf-review__change:focus { outline: 4px solid #ffeb3b; background: #ffeb3b; color: #212b32; }
.opf-review__list { margin: 0; }
.opf-review__row { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid #d8dde0; font-size: 16px; line-height: 24px; }
.opf-review__row dt { flex: 0 0 45%; font-weight: 600; margin: 0; }
.opf-review__row dd { flex: 1; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 640px) { .opf-review__row { display: block; } }

/* --- Native form page in the legacy app (CuesFormView): OPERA+ form layout --- */
/* .op-dash gives the page the same padding and 32px heading as Manage patients. */
.op-dash.op-cues-page { padding-top: 8px; }
.op-cues-page .op-cues-page__back { display: inline-block; margin: 0 0 12px; }
.op-cues-page .op-cues-page__title { margin: 0; }
.op-cues-page .op-cues-page__lede { margin: 4px 0 28px; }
.op-cues-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .op-cues-layout { grid-template-columns: 1fr; } }
.op-cues-side { display: flex; flex-direction: column; gap: 16px; }
.op-cues-card, .op-cues-main { background: #fff; border: 1px solid #d8dde0; padding: 20px; }
.op-cues-main { padding: 20px 24px 24px; }
.op-cues-main .opf { max-width: none; padding: 0; font-size: 16px; line-height: 24px; }
.op-cues-main .opf-button { font-size: 17px; }
.op-cues-main .opf-cancel { font-size: 16px; }
.op-cues-main .opf-error-summary__title, .op-cues-main .opf-panel__title { font-size: 21px; line-height: 28px; }
/* Jotform page-break rules: the step line does that job here. */
.op-cues-main .opf-divider { display: none; }
.op-cues-card__title { font-size: 19px; line-height: 28px; font-weight: 600; margin: 0 0 12px; color: #212b32; }
.op-cues-card__form { color: #4c6272; font-size: 14px; margin: 8px 0 16px; }
.op-cues-badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.op-cues-badge { display: inline-block; border: 1px solid #d8dde0; background: #f0f4f5; color: #212b32; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 2px 10px; }
.op-cues-ccg-pill { display: inline-block; border: 1px solid #007f3b; background: #e6f4ea; color: #00401e; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 1px 10px; margin: 0 0 12px; }
.op-cues-details { margin: 0; }
.op-cues-details__row { margin: 0 0 10px; font-size: 14px; line-height: 20px; }
.op-cues-details__row dt { font-weight: 600; color: #212b32; margin: 0; }
.op-cues-details__row dd { margin: 0; color: #212b32; }
.op-cues-meta { color: #4c6272; font-size: 13px; }
.op-cues-address { display: block; color: #4c6272; font-size: 13px; text-transform: uppercase; }
.op-cues-indicators { display: flex; flex-direction: column; gap: 8px; }
.op-cues-indicator { display: block; text-align: center; font-size: 15px; font-weight: 600; padding: 14px 8px; border-radius: 4px; }
.op-cues-indicator--empty { background: #d8dde0; color: #768692; }
.op-cues-indicator--active { background: #005eb8; color: #fff; }
.op-cues-indicator--raf.op-cues-indicator--active { background: #7c2855; }
.op-cues-indicator--scr.op-cues-indicator--active { background: #007f3b; }
.op-cues-steps:empty { display: none; }

/* --- Fields added for CUES Face to Face (matrix, coded terms, medicines, lists) --- */
.opf-input--long { max-width: 32em; }
.opf-button--small { font-size: 16px; padding: 8px 14px; margin-top: 8px; }

.opf-matrix { border-collapse: collapse; margin-top: 8px; }
.opf-matrix th, .opf-matrix td { padding: 6px 10px; border-bottom: 1px solid #d8dde0; }
.opf-matrix__col { font-weight: 600; text-align: center; }
.opf-matrix__row { font-weight: normal; text-align: left; }
.opf-matrix__cell { text-align: center; }
.opf-matrix__input { width: 22px; height: 22px; accent-color: #005eb8; }

.opf-row-remove { height: 40px; width: 40px; border: none; background: #d8dde0; color: #4c6272; font-size: 22px; cursor: pointer; flex: none; }
.opf-row-remove:hover { background: #c4cbd0; }

/* SNOMED conditions: as OPERA+ (term, concept ID, eye, remove). */
.opf-coded__row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 160px 40px; gap: 8px; align-items: start; margin-bottom: 8px; }
.opf-coded__row .opf-select { min-width: 0; width: 100%; }
.opf-coded__term { position: relative; }
.opf-coded__code { color: #4c6272; }
.opf-suggestions { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 0; padding: 0; list-style: none; background: #fff; border: 2px solid #4c6272; border-top: 0; max-height: 260px; overflow-y: auto; }
.opf-suggestions__item { padding: 8px 12px; cursor: pointer; }
.opf-suggestions__item:hover { background: #e8edee; }
.opf-suggestions__none { padding: 8px 12px; color: #4c6272; }

/* Medicines: as OPERA+'s written-order embed. */
.opf-meds__funding { margin: 4px 0 12px; }
.opf-switch { min-width: 120px; height: 38px; border: none; border-radius: 19px; padding: 0 18px; color: #fff; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.opf-switch--nhs { background: #00a499; }
.opf-switch--private { background: #d5281b; }
.opf-meds__row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.1fr) 40px; gap: 12px; align-items: end; margin-bottom: 12px; }
.opf-meds__field { display: block; }
.opf-meds__field .opf-select { min-width: 0; width: 100%; }

.opf-multi__row { display: flex; gap: 8px; margin-bottom: 8px; }

@media (max-width: 860px) {
  .opf-coded__row, .opf-meds__row { grid-template-columns: 1fr; }
}

/* Earlier forms' answers beside a follow-on form (ReferralManagement/JotFormView). */
.op-form-answers { background: #fff; border: 1px solid #d8dde0; padding: 16px 20px; max-height: 1100px; overflow-y: auto; }
.op-form-answers__form + .op-form-answers__form { margin-top: 32px; border-top: 2px solid #d8dde0; padding-top: 16px; }
.op-form-answers__title { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.op-form-answers__meta { color: #4c6272; margin: 0 0 16px; }
.op-native-form { background: #fff; border: 1px solid #d8dde0; padding: 16px 20px; }
