/* engholm.no — styles for the forms once they go through the form service
   (FORMS_SERVICE in src/lib/flags.ts). A file of its own, on purpose: the
   site's main stylesheet stays byte for byte what it was. */

/* the line under the Send button: what went wrong, or a short note */
.fstatus{margin:18px 0 0;max-width:62ch;padding:12px 14px;border:1px solid var(--ember);font-size:.84rem;line-height:1.6;color:var(--snow)}
.fstatus[hidden]{display:none}
.fstatus[data-kind="note"],.fstatus[data-kind="done"]{border-color:var(--line);color:var(--bone)}

/* a message from the server beside the box it is about */
.ferr{margin:7px 0 0;font-size:.78rem;line-height:1.5;color:var(--ember-lt);letter-spacing:0;text-transform:none}
.bform [aria-invalid="true"],.nlbox [aria-invalid="true"]{border-color:var(--ember)}

/* "thank you" in place of the form */
.fdone{max-width:760px;border:1px solid var(--line);padding:clamp(24px,3.4vw,40px);outline:none}
.fdone[hidden]{display:none}
.fdone h2,.fdone h3{font-family:inherit;font-weight:500;font-size:clamp(1.3rem,2.2vw,1.7rem);line-height:1.25;color:var(--snow);margin:0 0 12px}
.fdone p{max-width:60ch;font-size:.95rem;line-height:1.7;color:var(--bone)}
.fdone p + p{margin-top:10px}
.fdone a{color:var(--bone);text-decoration:underline}

.bform button.cta[disabled]{opacity:.6;cursor:progress}
.bform noscript p,.nlbox noscript p{margin:14px 0 0;font-size:.82rem;line-height:1.6;color:var(--ember-lt)}

/* the spam check (ALTCHA) in the site's own colours */
altcha-widget{
  display:block;margin:0 0 18px;
  --altcha-max-width:320px;
  --altcha-border-radius:0;
  --altcha-border-color:rgba(207,201,188,.16);
  --altcha-color-base:#101312;
  --altcha-color-base-content:#CFC9BC;
  --altcha-color-neutral:#171A19;
  --altcha-color-neutral-content:#CFC9BC;
  --altcha-color-primary:#C8813C;
  --altcha-color-primary-content:#120C05;
  --altcha-color-error:#E0A45E;
  --altcha-spinner-color:#C8813C;
}

/* the newsletter box in the footer */
/* the same four columns as the footer's link lists above it, so the box
   starts exactly under "Visit" */
.nlbox{margin-top:clamp(34px,5vh,56px);padding-top:clamp(26px,4vh,40px);border-top:1px solid var(--line);
  display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:clamp(22px,3vw,48px);align-items:start}
.nlbox > :nth-child(2){grid-column:2 / -1}
.nlbox__intro .fhead{margin:0 0 10px;line-height:1.6;font-size:.62rem;letter-spacing:.2em;text-transform:uppercase;color:var(--mute)}
.nlbox__intro p.body{max-width:34ch;font-size:.86rem}
.nlbox form{max-width:520px}
.nlbox label.nl-lab{display:block;margin-bottom:7px;font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:var(--bone)}
.nlbox .nl-row{display:flex;gap:12px;align-items:stretch}
.nlbox input[type="email"]{flex:1;min-width:0;padding:12px 14px;background:var(--ink-2);border:1px solid var(--line);color:var(--snow);font:inherit;font-size:.92rem;border-radius:0;transition:border-color .3s}
.nlbox input[type="email"]:focus{outline:none;border-color:var(--ember)}
.nlbox button.cta{margin-top:0;background:none;font-family:inherit;font-size:.7rem;line-height:inherit;color:inherit;cursor:pointer;appearance:none;-webkit-appearance:none;white-space:nowrap}
.nlbox button.cta:hover{background:var(--ember);color:#120C05}
.nlbox button.cta[disabled]{opacity:.6;cursor:progress}
.nlbox .nl-consent{display:flex;gap:10px;align-items:flex-start;margin-top:14px;font-size:.8rem;line-height:1.55;color:var(--bone)}
.nlbox .nl-consent input{accent-color:var(--ember);width:15px;height:15px;margin-top:3px;flex:none}
.nlbox .nl-consent a,.nlbox .fdone a{color:var(--bone);text-decoration:underline}
.nlbox .fstatus{margin-top:14px;font-size:.8rem}
.nlbox .fdone{border:0;padding:0}
.nlbox .fdone p{font-size:.9rem}
.nlbox altcha-widget{margin:14px 0 0}
@media(max-width:860px){
  .nlbox{grid-template-columns:1fr}
  .nlbox > :nth-child(2){grid-column:auto}
  .nlbox .nl-row{flex-direction:column}
}
