/* «Be om design» skjema-v2 (Dina 14.11.2026, godkjent). Bare tokens fra styles.css/order.css. Brukes av /be-om-design/ og /be-om-design/takk/. */

/* --- Side: én midtstilt kolonne, samme bredde som #step-1 på forsiden og .case på /design-sak/ --- */
.bd { max-width: 680px; margin: 0 auto; padding-block: 8px 96px; } /* padding-block: ikke null ut .wrap sin sidemarg */
.bd .crumbs { margin: 20px 0 16px; }
.bd__title { font: 700 32px/1.15 var(--font-head); letter-spacing: -0.02em; color: var(--ink); margin: 0 0 12px; overflow-wrap: anywhere; }
.bd__lead { font-size: 17px; line-height: 1.6; color: var(--text-dim); margin: 0; max-width: 62ch; }
@media (max-width: 860px) { .bd__title { font-size: 26px; } .bd__lead { font-size: 16px; } }

/* Fire fakta (de tre oppsummeringslinjene + «Å betale nå») som rolig rad, synlig også på mobil */
.bd-facts { list-style: none; margin: 24px 0 32px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.bd-facts li { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--ink); }
.bd-facts li:nth-child(odd) { padding-right: 24px; }
.bd-facts .bd-facts__pay b { font: 600 15px var(--font-body); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bd-facts { grid-template-columns: minmax(0, 1fr); } .bd-facts li { padding-right: 0; } }

/* --- Skjemaramme: samme flate som .wizard__frame på forsiden --- */
.bd-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
@media (max-width: 860px) { .bd-frame { padding: 24px 16px; } }
.bd-frame .order { display: block; } /* .order beholdes for felt-/valgkort-stilene, men uten to-kolonne-grid */
.bd-sec { border: 0; margin: 0; padding: 0; min-width: 0; }
.bd-sec + .bd-sec { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.bd-sec > legend, .bd-sec > h2 { font: 700 18px/1.2 var(--font-head); letter-spacing: -0.01em; color: var(--ink); margin: 0 0 4px; padding: 0; float: left; width: 100%; }
.bd-sec > legend + *, .bd-sec > h2 + * { clear: both; }
.bd-sec__no { font: 500 14px var(--font-mono); color: var(--text-faint); margin-right: 8px; font-variant-numeric: tabular-nums; }
.bd-sec > legend, .bd-sec > h2 { margin-bottom: 0 !important; padding-bottom: 14px !important; }
.bd-frame .order .bd-sec > legend + .field, .bd-frame .order .bd-sec > legend + .bd-two > .field { margin-top: 0; }
.bd-frame .order .field { margin-top: 20px; }

/* Hjelpetekst + teller på samme linje */
.bd-help-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.bd-help-row .order-section__help { margin-top: 0; }
.bd-count { flex: none; font: 14px var(--font-body); color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* Bilder: liten slippflate i samme stil som .dropzone på forsiden */
.bd-drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); padding: 20px; display: grid; gap: 12px; justify-items: start; }
.bd-drop .btn { min-height: 44px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
@media (hover: hover) { .bd-drop .btn:hover { border-color: var(--ink); } }
.bd-drop .btn:focus-visible, .bd-chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.bd-drop .order-section__help { margin: 0; }
.photo-tray__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; }
.photo-tray__grid:empty { display: none; }
.photo-tray__item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg-alt-2); border: 1px solid var(--line); }
.photo-tray__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tray__remove { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.photo-tray__remove::before { content: "×"; width: 26px; height: 26px; border-radius: 50%; background: rgba(36, 28, 21, .82); color: #fff; font: 600 18px/26px var(--font-body); text-align: center; }
.photo-tray__remove:focus-visible { outline: none; } .photo-tray__remove:focus-visible::before { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 560px) { .photo-tray__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Materiale: radioknapper som valgkort (.choice fra order.css), kompakt */
.bd-mat { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.bd-mat .choice { flex: 1 1 72px; padding: 11px 12px; text-align: center; }
.bd-mat .choice--wide { flex: 2 1 150px; }
.bd-mat .choice__title { font-weight: 600; }
@media (max-width: 560px) { .bd-mat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } .bd-mat .choice--wide { grid-column: span 3; } }
.field.has-error .bd-mat .choice { border-color: var(--o-err); }

/* Farge: fritt felt + én hurtigknapp «Usikker» (verdien finnes fra før i datalisten) */
.bd-color { display: flex; gap: 8px; }
.bd-color input { flex: 1 1 auto; min-width: 0; }
.bd-chip { flex: none; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 15px var(--font-body); cursor: pointer; }
.bd-chip[aria-pressed="true"] { border-color: var(--o-select); box-shadow: inset 0 0 0 1px var(--o-select); background: var(--o-surface-sel); }

/* Kontakt: to kolonner fra 561 px */
.bd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.bd-frame .order .bd-two > .field { margin-top: 0; }
@media (max-width: 560px) { .bd-consents .field { padding: 14px 12px; } .bd-two { grid-template-columns: minmax(0, 1fr); } }
/* Fakturaadresse: postnummer og poststed side om side (postnummer smalt) */
.bd-addr2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
#field-address { margin-top: 20px; }
fieldset.bd-addr-set { border: 0; padding: 0; min-width: 0; }
.bd-addr-set > legend { padding: 0; font: inherit; font-weight: 500; margin-bottom: 6px; }

/* Gebyroversikt: liste, ikke tabell med fet tekst. Situasjon dempet, utfall i ink 500. */
.refund-overview__table { width: 100%; border-collapse: collapse; margin-top: 12px; border-top: 1px solid var(--line); }
.refund-overview__table th, .refund-overview__table td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.refund-overview__table th { font-weight: 400; color: var(--text-dim); width: 52%; padding-right: 24px; }
.refund-overview__table td { font-weight: 500; color: var(--ink); }
@media (max-width: 560px) {
  .refund-overview__table, .refund-overview__table tbody, .refund-overview__table tr, .refund-overview__table th, .refund-overview__table td { display: block; width: auto; }
  .refund-overview__table th { border-bottom: 0; padding: 12px 0 2px; }
  .refund-overview__table td { padding: 0 0 12px; }
}

/* Samtykker: én rad per avkrysning med skillelinje, tydelig tittel (**…**) */
.bd-consents { margin-top: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.bd-consents .field { margin: 0 !important; padding: 16px; display: grid; gap: 6px; }
.bd-consents .field + .field { border-top: 1px solid var(--line); }
.order .bd-consents .field > label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font: 15px/1.55 var(--font-body); color: var(--text-dim); cursor: pointer; }
.order .bd-consents label strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.bd-consents input[type=checkbox] { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.bd-consents .order-section__help, .bd-consents .field__error { margin-left: 34px; }
.bd-consents .field.has-error { background: var(--o-err-soft); }
.bd-consents .field:first-child { border-radius: var(--radius) var(--radius) 0 0; } .bd-consents .field:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.bd-terms { margin: 16px 0 0; font-size: 15px; color: var(--text-dim); }
.bd-terms a { color: var(--orange-text); text-decoration: underline; text-underline-offset: 3px; }

/* Betal: beløpet rett over knappen (mønster «Kunden betaler nå») */
.bd-pay { margin-top: 24px; display: grid; gap: 12px; }
.bd-pay__sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--ink); }
.bd-pay__sum b { font: 600 26px/1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.bd-pay .btn-primary { min-height: 52px; font-size: 16px; }
.bd-pay .form-status { margin: 0; min-height: 0; }
.bd-pay .form-status:empty { display: none; } /* står under knappen: ingenting under den flytter seg */
.form-status--error { color: var(--o-err, #A93624); font-weight: 600; } /* JS setter klassen ved sendefeil; fantes ikke i CSS før */
.bd-edit { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.bd-edit .btn { min-height: 44px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.bd-frame.is-locked .bd-sec:not(.bd-sec--pay) { opacity: .6; }
.stripe-skel { max-width: none; }

/* Feiloppsummering */
#bd-errsum { margin: 0 0 24px; }
#bd-errsum ul { margin: 6px 0 0; padding-left: 18px; }
#bd-errsum a { color: var(--o-ink); text-decoration: underline; text-underline-offset: 3px; }
#bd-errsum:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.order .field.has-error textarea, .order .field.has-error input:not([type=checkbox]) { border-color: var(--o-err); box-shadow: inset 0 0 0 1px var(--o-err); }

/* Laster: skjelett i samme høyde som ferdig ramme (CLS). Lead og fakta reserverer høyde til konfig er hentet. */
.bd__lead { min-height: 6.4em; } .bd-facts { min-height: 188px; }
@media (max-width: 860px) { .bd__lead { min-height: 14.4em; } }
@media (max-width: 560px) { .bd-facts { min-height: 220px; } }
.bd-frame:has(> #bd-loading[hidden]) { min-height: 0; }
.bd-skel { display: grid; gap: 14px; }
.bd-skel[hidden], .bd-frame [hidden] { display: none !important; }
.bd-skel .skel:nth-child(1) { height: 22px; width: 40%; } .bd-skel .skel:nth-child(2) { height: 140px; } .bd-skel .skel:nth-child(3) { height: 96px; }
.bd-skel .skel:nth-child(4) { height: 22px; width: 35%; margin-top: 18px; } .bd-skel .skel:nth-child(5) { height: 48px; } .bd-skel .skel:nth-child(6) { height: 48px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.order .vh { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; left: 0; } /* .order input { width: 100% } må ikke gjøre den skjulte filvelgeren bred (sidelengs rulling) */
