/* ==========================================================================
   wsc_layout — placeable column row ("Websignaal Layout")
   The three track lists come in as inline custom properties (--wsc-lay-d/-t/-m),
   NEVER as an inline grid-template-columns, so these media queries keep winning.
   Breakpoints: desktop >1024px · tablet 601–1024px · phone ≤600px.
   ========================================================================== */

.wsc-lay {
  width: 100%;
  overflow-x: clip; /* safety net: no sideways page scroll from a wide child */
}

.wsc-lay__grid {
  display: grid;
  grid-template-columns: var(--wsc-lay-d, minmax(0, 1fr));
  gap: var(--wsc-lay-gap, clamp(20px, 3vw, 34px));
  align-items: var(--wsc-lay-va, stretch);
}

.wsc-lay__col {
  min-width: 0; /* lets wide children (tables, code, images) shrink */
  position: relative;
}

.wsc-lay__col > *:last-child { margin-bottom: 0; }

/* ---------- Width / inner container ---------- */
.wsc-lay__inner { margin-inline: auto; }
.wsc-lay--w-contained .wsc-lay__inner { max-width: var(--wsc-maxw, 1220px); padding-inline: var(--wsc-gutter, clamp(18px, 4vw, 40px)); }
.wsc-lay--w-wide .wsc-lay__inner { max-width: 1560px; padding-inline: var(--wsc-gutter, clamp(18px, 4vw, 40px)); }
.wsc-lay--w-full .wsc-lay__inner { max-width: none; padding-inline: 0; }

/* ---------- Vertical rhythm ---------- */
.wsc-lay--pt-none .wsc-lay__inner { padding-top: 0; }
.wsc-lay--pt-s .wsc-lay__inner { padding-top: clamp(20px, 3vw, 32px); }
.wsc-lay--pt-m .wsc-lay__inner { padding-top: var(--wsc-section-y, clamp(56px, 8vw, 96px)); }
.wsc-lay--pt-l .wsc-lay__inner { padding-top: clamp(80px, 10vw, 140px); }
.wsc-lay--pb-none .wsc-lay__inner { padding-bottom: 0; }
.wsc-lay--pb-s .wsc-lay__inner { padding-bottom: clamp(20px, 3vw, 32px); }
.wsc-lay--pb-m .wsc-lay__inner { padding-bottom: var(--wsc-section-y, clamp(56px, 8vw, 96px)); }
.wsc-lay--pb-l .wsc-lay__inner { padding-bottom: clamp(80px, 10vw, 140px); }

/* ---------- Gaps ---------- */
.wsc-lay--gap-none { --wsc-lay-gap: 0px; }
.wsc-lay--gap-xs { --wsc-lay-gap: 8px; }
.wsc-lay--gap-s { --wsc-lay-gap: clamp(12px, 1.6vw, 18px); }
.wsc-lay--gap-m { --wsc-lay-gap: clamp(20px, 3vw, 34px); }
.wsc-lay--gap-l { --wsc-lay-gap: clamp(28px, 4vw, 48px); }
.wsc-lay--gap-xl { --wsc-lay-gap: clamp(36px, 5vw, 64px); }

/* ---------- Vertical alignment ---------- */
.wsc-lay--va-stretch { --wsc-lay-va: stretch; }
.wsc-lay--va-top { --wsc-lay-va: start; }
.wsc-lay--va-center { --wsc-lay-va: center; }
.wsc-lay--va-bottom { --wsc-lay-va: end; }

/* ---------- Optional accent band (the other backgrounds come from core.css) -- */
.wsc-band--accent { background: var(--wsc-accent, #FFA934); color: var(--wsc-ink, #14161B); }
.wsc-band--accent h1, .wsc-band--accent h2, .wsc-band--accent h3, .wsc-band--accent h4,
.wsc-band--accent p { color: var(--wsc-ink, #14161B); }

/* ---------- Per-column surfaces ---------- */
.wsc-lay__col--card,
.wsc-lay__col--light,
.wsc-lay__col--dark,
.wsc-lay__col--accent,
.wsc-lay__col--border {
  border-radius: var(--wsc-radius-lg, 20px);
  padding: clamp(20px, 3vw, 32px);
}
.wsc-lay__col--card { background: var(--wsc-surface, #fff); border: 1px solid var(--wsc-line, #E3E7ED); }
.wsc-lay__col--light { background: var(--wsc-bg, #F1F3F6); }
.wsc-lay__col--border { border: 1px solid var(--wsc-line-2, #C9D0DA); }
.wsc-lay__col--accent { background: var(--wsc-accent, #FFA934); color: var(--wsc-ink, #14161B); }
.wsc-lay__col--dark { background: var(--wsc-footer-bg, #0F1115); color: var(--wsc-footer-ink, #B7BECC); }
.wsc-lay__col--dark h1, .wsc-lay__col--dark h2, .wsc-lay__col--dark h3, .wsc-lay__col--dark h4 { color: #fff; }

/* Seamless media: stretch images to fill their column edge-to-edge, so a photo
   grid with gap "Geen" has the images flush against each other (they otherwise
   render at their natural size and leave gaps). */
.wsc-lay--fill .wsc-lay__col img,
.wsc-lay--fill .wsc-lay__col picture,
.wsc-lay--fill .wsc-lay__col .wsc-media,
.wsc-lay--fill .wsc-lay__col .wsc-media__img {
  display: block; width: 100%; height: auto; margin: 0;
}
.wsc-lay--fill .wsc-lay__col .wsc-media { border-radius: 0; box-shadow: none; }

/* Per-column shape: round the corners, or clip the content to a square / circle.
   Media inside is made to cover the shaped cell so images fill it edge-to-edge. */
.wsc-lay__col--shape-rounded { border-radius: var(--wsc-lay-round, 18px); overflow: hidden; }
.wsc-lay__col--shape-square { aspect-ratio: 1 / 1; overflow: hidden; }
.wsc-lay__col--shape-circle { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50%; }
/* Adjustable corner radius for "Afgerond". */
.wsc-lay--round-sm { --wsc-lay-round: 8px; }
.wsc-lay--round-md { --wsc-lay-round: 18px; }
.wsc-lay--round-lg { --wsc-lay-round: 32px; }
/* Crop focus for square/circle cropped media. */
.wsc-lay--crop-top .wsc-lay__col--shape-square img,
.wsc-lay--crop-top .wsc-lay__col--shape-circle img,
.wsc-lay--crop-top .wsc-lay__col--shape-square .wsc-media__img,
.wsc-lay--crop-top .wsc-lay__col--shape-circle .wsc-media__img { object-position: top; }
.wsc-lay--crop-bottom .wsc-lay__col--shape-square img,
.wsc-lay--crop-bottom .wsc-lay__col--shape-circle img,
.wsc-lay--crop-bottom .wsc-lay__col--shape-square .wsc-media__img,
.wsc-lay--crop-bottom .wsc-lay__col--shape-circle .wsc-media__img { object-position: bottom; }
.wsc-lay__col--shape-square,
.wsc-lay__col--shape-circle { display: flex; }
.wsc-lay__col--shape-square > *,
.wsc-lay__col--shape-circle > * { flex: 1 1 auto; min-width: 0; width: 100%; }
.wsc-lay__col--shape-square img,
.wsc-lay__col--shape-circle img,
.wsc-lay__col--shape-square .wsc-media,
.wsc-lay__col--shape-circle .wsc-media,
.wsc-lay__col--shape-square .wsc-media__img,
.wsc-lay__col--shape-circle .wsc-media__img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0; margin: 0;
}
.wsc-lay__col--dark p, .wsc-lay__col--dark .wsc-lead { color: var(--wsc-footer-ink, #B7BECC); }

/* ---------- Nested wsc section blocks -------------------------------------
   Section blocks bring their own full-width band + container + section padding.
   Inside a column that would double the gutters and shrink the content, so the
   chrome is neutralised and only coloured bands keep a little breathing room.
   -------------------------------------------------------------------------- */
.wsc-lay__col .wsc-container { max-width: none; padding-inline: 0; }
.wsc-lay__col .wsc-section,
.wsc-lay__col .wsc-section--tight { padding-block: 0; }
/* Every band inside a column keeps some inner breathing room so text/content
   doesn't sit against the column edges. */
.wsc-lay__col .wsc-band--white,
.wsc-lay__col .wsc-band--light,
.wsc-lay__col .wsc-band--dark,
.wsc-lay__col .wsc-band--accent {
  box-sizing: border-box;
  padding: clamp(18px, 2.6vw, 28px);
}
.wsc-lay__col .wsc-band--light,
.wsc-lay__col .wsc-band--dark,
.wsc-lay__col .wsc-band--accent { border-radius: var(--wsc-radius, 14px); }
/* A section block fills the full (stretched) column height, so a shorter text
   block no longer leaves an empty strip below it in the column. */
.wsc-lay__col > .wsc-band { height: 100%; }
/* A nested layout row must not re-apply the page gutter either. */
.wsc-lay__col .wsc-lay__inner { max-width: none; padding-inline: 0; }

/* ---------- Desktop only: >1024px ---------- */
@media (min-width: 1025px) {
  .wsc-lay__col--hide-d { display: none; }
}

/* ---------- Tablet: 601–1024px ---------- */
@media (max-width: 1024px) {
  .wsc-lay__grid { grid-template-columns: var(--wsc-lay-t, var(--wsc-lay-d, minmax(0, 1fr))); }
}
@media (min-width: 601px) and (max-width: 1024px) {
  .wsc-lay__col--hide-t { display: none; }
}

/* ---------- Phone: ≤600px ---------- */
@media (max-width: 600px) {
  .wsc-lay__grid { grid-template-columns: var(--wsc-lay-m, minmax(0, 1fr)); }
  .wsc-lay__col--hide-m { display: none; }
  /* Phone order: from the per-column setting, or from "reverse on mobile". */
  .wsc-lay__col { order: var(--wsc-lay-ord, 0); }
  /* Long words / URLs may never force a horizontal scroll. */
  .wsc-lay__col { overflow-wrap: break-word; }
  .wsc-lay--w-full .wsc-lay__inner { padding-inline: 0; }
  .wsc-lay__col--card,
  .wsc-lay__col--light,
  .wsc-lay__col--dark,
  .wsc-lay__col--accent,
  .wsc-lay__col--border { padding: 18px; border-radius: var(--wsc-radius, 14px); }
}

/* ---------- Edit mode: keep empty columns visible and droppable ----------
   Concrete labels every column sub-area itself, so the outline is all that is
   needed here: it shows where a column starts and ends while dragging blocks. */
.wsc-lay--edit { position: relative; }
.wsc-lay--edit .wsc-lay__col {
  outline: 1px dashed var(--wsc-line-2, #C9D0DA);
  outline-offset: 2px;
  min-height: 90px;
}

/* The row's own menu handle. Concrete's hover overlay follows this button, so
   it stays off the columns and the blocks inside them remain clickable. */
.wsc-lay__handle {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--wsc-line-2, #C9D0DA);
  border-radius: 6px;
  background: #fff;
  color: var(--wsc-ink-2, #4E5563);
  font: 600 11px/1 var(--wsc-font-body, system-ui, sans-serif);
  letter-spacing: .02em;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 22, 27, .12);
}
.wsc-lay__handle:hover { border-color: var(--wsc-accent-h, #F89828); color: var(--wsc-ink, #14161B); }
.wsc-lay__handle-icon { font-size: 12px; line-height: 1; }

/* Columns that disappear on one of the breakpoints stay visible while editing,
   with a badge saying where they drop out. */
.wsc-lay--edit .wsc-lay__col--marks-d,
.wsc-lay--edit .wsc-lay__col--marks-t,
.wsc-lay--edit .wsc-lay__col--marks-m { outline-style: dotted; opacity: .82; }
.wsc-lay__flag {
  position: absolute;
  top: -10px;
  right: 0;
  z-index: 3;
  font: 600 10px/1.6 var(--wsc-font-body, system-ui, sans-serif);
  color: #fff;
  background: var(--wsc-ink-3, #8A91A0);
  border-radius: 6px;
  padding: 1px 7px;
  pointer-events: none;
}
