/* pages.css — page-specific styles (Task 3+) */

/* ===== FORSIDE (f3 variant) ===== */

.hero {
  padding: 56px 56px;
}
/* Versal-kursiv er hero-overskriftens design, ikke et label der raaber.
   No-all-caps-reglen gaelder de smaa labels — kickers, stand-linjer,
   nav-etiketter — og ikke de to display-overskrifter. Johannes 2026-09-15,
   efter at kunden savnede versalerne. Samme afgraensning paa
   .pp-hero__title nedenfor; alt andet i arket bliver staaende smaat. */
.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 7.2vw, 104px);
  line-height: 0.92;
  color: var(--tekst);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-style: italic;
  margin: 0;
  text-wrap: balance;
}

.boxes {
  padding: 0 56px 56px;
}
.boxes__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Size the row explicitly, so the boxes' height:100% has a definite row to
     resolve against instead of an auto one. */
  grid-auto-rows: 1fr;
  gap: 24px;
}
.box {
  aspect-ratio: 4 / 3;
  /* Stretch every box to the row height, so a box with one line of text more
     does not end up taller than its neighbours. width:100% is load-bearing:
     without it aspect-ratio derives the width from the stretched height and
     the box grows wider than its grid column. */
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--sidehvid);
  text-decoration: none;
  transition: transform 0.25s ease;
}
.box:hover {
  transform: translateY(-4px);
}
.box--1,
.box--2,
.box--3 {
  background: var(--bla);
}
.box__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 3.9vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
  text-transform: none;
  font-style: normal;
  color: var(--sidehvid);
  margin: 0;   /* reset the UA h2 margin so the title stays inside the 4/3 box */
}

.ai {
  padding: 0 56px 80px;
}
.ai__box {
  background: var(--magenta);
  color: var(--sort);
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.ai__box:hover {
  transform: translateY(-2px);
}
.ai__lead {
  display: flex;
  align-items: center;
  gap: 22px;
}
.ai__icon {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.ai__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: none;
  font-style: normal;
  color: var(--sort);
  margin: 0;   /* nulstil UA h2-margin — ellers vokser magenta-bjælken (godkendt: 116px høj) */
}
.ai__arrow {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* ===== PROGRAMSIDE (bog-e0o) ===== */

/* Hero */
.pp-hero {
  background: var(--sidehvid);
  padding: 48px 56px 28px;
}
/* Display-overskrift, samme afgraensning fra no-all-caps-reglen som
   .hero__title ovenfor, hvor begrundelsen staar. */
.pp-hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(48px, 5.5vw, 80px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--tekst);
  text-transform: uppercase;
  font-style: italic;
  margin: 0;
}

/* Search bar */
.pp-search {
  background: #fff;
  margin: 0 56px;
  padding: 24px 28px;
  border: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: end;
}
.pp-search__label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tekst-mute);
  margin-bottom: 6px;
}
.pp-search__field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-soft);
  background: var(--sidehvid);
}
.pp-search__field svg {
  margin: 0 16px;
  width: 22px;
  height: 22px;
  stroke: var(--tekst-mute);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.pp-search__field input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 16px 16px 16px 0;
  font-size: 17px;
  color: var(--tekst);
  outline: none;
  /* Indtastet tekst = sans (arver body); kun placeholder er serif-kursiv (godkendt) */
}
.pp-search__field input::placeholder {
  color: var(--tekst-mute);
  font-style: italic;
  font-family: var(--serif);
}
.pp-search__select {
  position: relative;
}
.pp-search__select select {
  width: 100%;
  border: 1px solid var(--border-soft);
  background: #fff;
  padding: 15px 38px 15px 16px;
  font-size: 15px;
  color: var(--tekst);
  appearance: none;
  cursor: pointer;
  font-family: var(--sans);
}
.pp-search__select::after {
  content: "▾";
  position: absolute;
  right: 14px;
  bottom: 15px;
  color: var(--tekst-mute);
  pointer-events: none;
  font-size: 13px;
}

/* Mobile chips — hidden on desktop */
.pp-dag-chips {
  display: none;
}

/* ===== FORSIDE: mobil app-shell (bar-kasser) — godkendt design bog-e0o ===== */
/* Desktop viser .forside-desktop; mobil viser .forside-mobile (lodrette bar-kasser, ingen hero). */
.forside-mobile { display: none; }

@media (max-width: 767px) {
  .forside-desktop { display: none; }
  .forside-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }
  .mbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 92px;
    padding: 22px;
    color: var(--sidehvid);
    text-decoration: none;
    transition: transform 0.2s ease;
  }
  .mbox:hover { transform: translateY(-2px); }
  .mbox--blaa { background: var(--bla); }
  .mbox--tove { background: var(--magenta); color: var(--sort); }   /* mørk Tove-tekst (WCAG-override) */
  .mbox__lead { display: flex; align-items: center; gap: 14px; }
  .mbox__icon { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
  .mbox__title {
    font-family: var(--serif);
    font-weight: 700;
    font-style: normal;
    font-size: 23px;
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-transform: none;
  }
  .mbox__arrow { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
}

/* ===== PROGRAMSIDE: mobil (≤767px) ===== */
@media (max-width: 767px) {
  /* Hero: hide on mobile (programside uses no large hero on mobile) */
  .pp-hero {
    display: none;
  }
  /* Opt-in per page: the page keeps its title on a phone, as a centred
     serif line on the page background (mockups/v5-mine-enheder, choice A). */
  .pp-hero.pp-hero--mobil {
    display: block;
    background: none;
    padding: 12px 16px 16px;
    text-align: center;
  }
  .pp-hero--mobil .pp-hero__title {
    font-size: 30px;
    line-height: 1.05;
    font-style: normal;
    text-transform: none;
  }

  /* Search: full-width, compact */
  .pp-search {
    display: block;
    margin: 0;
    padding: 12px 14px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
  }
  .pp-search__field-wrap {
    margin-bottom: 0;
  }
  .pp-search__label {
    display: none; /* Clean on mobile — no "Søg"/"Dag" labels */
  }
  .pp-search__field {
    background: #fff;
    border: 1px solid var(--border-soft);
    margin-bottom: 10px;
  }
  .pp-search__field input {
    font-size: 15px;
    padding: 10px 10px 10px 0;
  }
  .pp-search__field svg {
    margin: 0 12px;
    width: 20px;
    height: 20px;
  }

  /* Hide desktop select on mobile */
  .pp-search__dag-wrap {
    /* wrapper stays, but select is hidden, chips shown */
  }
  .pp-search__select {
    display: none;
  }

  /* Show day chips on mobile */
  .pp-dag-chips {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .pp-dag-chip {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 14px;
    border: 1px solid var(--border-soft);
    background: #fff;
    color: var(--tekst-mute);
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--sans);
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
  }
  .pp-dag-chip.active {
    background: var(--tekst);
    color: #fff;
    border-color: var(--tekst);
  }

}

/* ===== Delte programmer (/dit-program/delte-programmer/) =====
   Facit: the platform's dit-program-samlet mockup, kapitel 3, state R5.
   The platform's besoeg-delinger fragment is mounted in the page itself, not
   in an embed's shadow root (assets/js/delte-programmer.js), so it gets none
   of the embed's token bridge or layout rules. Its klodser read their look
   from the public --ug-* names; this block gives them Bogforum's values and
   the layout utilities the fragment's wrappers name. --ug-accent and
   --ug-radius come from the embed rule in layout.css. */
.bf-delinger {
  --ug-border: var(--border);
  --ug-surface: #fff;
  --ug-text: var(--tekst);
  --ug-text-quiet: var(--tekst-mute);
  --ug-text-faint: var(--tekst-mute);
  --ug-on-accent: #fff;
  --ug-brand: var(--bla);
  --ug-brand-strong: var(--bla);
  --ug-icon-accent: var(--bla);
  --ug-ink-icon-primary: currentColor;
  --ug-ink-icon-secondary: currentColor;
  --ug-danger: #b6000e;
  --ug-danger-40: #b6000e;
  --ug-danger-70: #ff8f82;
  --ug-radius-s: 2px;
  --ug-radius-pill: 0;
  --ug-divider-style: solid;
  --wa-border-width-s: 1px;
  --wa-focus-ring: 2px solid var(--bla);
  --wa-focus-ring-offset: 2px;
  --ug-glyph-size: 1em;
  --ug-weight-semibold: 600;
  --ug-weight-bold: 700;
  --ug-leading-flush: 1;
  --ug-leading-tight: 1.12;
  --ug-leading-normal: 1.5;
  --ug-measure-pitch: 34ch;
  --ug-text-xs: 11px;
  --ug-text-s: 13px;
  --ug-text-m: 14px;
  --ug-text-l: 15px;
  --ug-text-2xl: 25px;
  --ug-space-4xs: 1px;
  --ug-space-3xs: 4px;
  --ug-space-2xs: 8px;
  --ug-space-s: 16px;
  --ug-space-l: 24px;
  --ug-knap-h-s: 32px;
  --ug-knap-font-s: 13px;
  --ug-knap-gap-s: 6px;
  --ug-knap-pad-s: 12px;
  --ug-knap-pad-m: 12px;
  --ug-knap-ikon-s: 16px;
  --ug-knap-ikon-m: 20px;
  --ug-knap-touch-min: 44px;
  --ug-prik-farve-0: #5b5957;
  --ug-prik-farve-1: #9c660a;
  --ug-prik-farve-2: #c14e33;
  --ug-prik-farve-3: #a8326e;
  --ug-prik-farve-4: #00836d;
  --ug-on-prik-farve: #fff;
  font-family: var(--sans);
  color: var(--tekst);
}

/* The layout utilities, in Web Awesome's own meaning. The gap is the one the
   composer writes inline on the wrapper. */
.bf-delinger .wa-stack,
.bf-delinger .wa-cluster {
  display: flex;
  gap: var(--wa-gap, 16px);
}
.bf-delinger .wa-stack { flex-direction: column; }
.bf-delinger .wa-cluster {
  flex-wrap: wrap;
  align-items: center;
}
.bf-delinger :is(.wa-stack, .wa-cluster) > * { margin: 0; }

/* «Del dit eget program» opens the Del popover of a <ug-searchview>, and
   there is none on this page: the button does nothing here. It stays out
   until the platform gives this page a popover of its own. */
.bf-delinger ug-del-program-button {
  display: none;
}

/* «← Dit program», the page's own way back (the platform leaves its back
   link out). */
.bf-delinger__tilbage {
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--tekst);
  font: 500 14px/1 var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* The page's own sentence when the platform cannot answer (no device yet, or
   a failed load) — set like the platform's empty line, ug-delinger-tom. */
.bf-delinger__besked {
  max-width: 34ch;
  margin: 24px auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tekst-mute);
}

/* One row per sender: name and status left, the actions right (R5). */
.bf-delinger [data-ug-id="grp-deling-person"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 4px;
  align-items: center;
}
.bf-delinger [data-ug-id="grp-deling-person"] > * { grid-column: 1; }
/* !important only against the composer's inline padding-block-start, which
   spaces the actions under the meta line when they stack. */
.bf-delinger [data-ug-id="grp-deling-person"] > [data-ug-id="grp-deling-handlinger"] {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 0 !important;
}
.bf-delinger ug-deling-navn {
  font-family: var(--serif);
  font-size: 19px;
}
/* The row's actions are R5's plain outlined buttons: text only, one height.
   The klodser's own rules arrive in the fragment's <style>, after this sheet,
   so these overrides win on specificity (two classes), not on order. */
.bf-delinger .bf-delinger__vaert :is(ug-kopier-link-button, ug-gem-alle-button, ug-fjern-kilde-button) button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  color: var(--tekst);
  font: 500 13px/1 var(--sans);
}
.bf-delinger .bf-delinger__vaert :is(ug-kopier-link-button, ug-gem-alle-button, ug-fjern-kilde-button) button:hover {
  border-color: var(--tekst);
}
.bf-delinger .bf-delinger__vaert :is(ug-kopier-glyph, ug-gem-glyph, ug-trash-glyph) {
  display: none;
}

@media (max-width: 767px) {
  /* Mobile: the page title is hidden (.pp-hero), so the back link leads and
     each row stacks with its actions under the name. */
  .bf-delinger [data-ug-id="grp-deling-person"] { grid-template-columns: minmax(0, 1fr); }
  .bf-delinger [data-ug-id="grp-deling-person"] > [data-ug-id="grp-deling-handlinger"] {
    grid-column: 1;
    grid-row: auto;
    padding-top: 8px !important;
  }
  .bf-delinger .bf-delinger__vaert :is(ug-kopier-link-button, ug-gem-alle-button, ug-fjern-kilde-button) button {
    padding: 0 10px;
  }
}
