/**
 * @file
 * Responsive redesign of the lekkerland theme.
 *
 * Same identity as the Drupal 7 site (soil background, cream panel, wooden
 * buttons, Cabin Sketch, terracotta), made fluid. The layout follows the
 * width of the page (container queries on .ll-cq), one markup for desktop,
 * tablet and phone. Loaded after the D7 styles.css and overrides its fixed
 * layout.
 */

/* The page background now lives on .ll (a 230 KB jpg instead of the 3 MB png). */
html { background: #2b201a; }
body { margin: 0; }

.ll-cq { container: ll / inline-size; }
.ll-cq [hidden] { display: none !important; }
.ll-cq *, .ll-cq *::before, .ll-cq *::after { box-sizing: border-box; }

.ll {
  min-height: 100vh;
  background: #2b201a url(../images/background.jpg) center top / cover no-repeat fixed;
  color: #2f2420;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
.ll a { color: #9c4520; text-underline-offset: 3px; }
.ll a:hover { color: #6e2c10; }
.ll img { max-width: 100%; height: auto; }

.ll-shell { max-width: 1200px; margin: 0 auto; padding: 40px 32px 48px; }
.ll-panel {
  position: relative;
  background: rgba(253, 241, 230, 0.92);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.ll-main { padding: 32px 44px 44px; overflow-wrap: anywhere; }
.ll .field-multiple-table { width: 100%; table-layout: fixed; }
.ll .field-multiple-table .field-multiple-drag { width: 32px; }
.ll .field-multiple-table .delta-order { width: 90px; }
.ll .paragraphs-subform select.form-select { width: 100%; }
.ll-footer {
  text-align: center;
  font-size: 14px;
  color: #5b4a42;
  padding: 18px 16px 22px;
  border-top: 1px solid rgba(104, 70, 61, 0.25);
}
.ll-footer p { margin: 0; }

.ll-h1,
.ll h1.page__title {
  font-family: 'cabinsketchbold', 'Cabin Sketch', cursive;
  font-weight: normal;
  color: #B6562C;
  font-size: 46px;
  line-height: 1.08;
  margin: 0 0 18px;
}
.ll-h2,
.ll-side .block__title {
  font-family: 'cabinsketchbold', 'Cabin Sketch', cursive;
  font-weight: normal;
  color: #B6562C;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 12px;
}
.ll-h3 {
  font-family: 'cabinsketchbold', 'Cabin Sketch', cursive;
  font-weight: normal;
  color: #7a3517;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}
.ll-intro { font-size: 19px; color: #4a3a33; margin: 0 0 24px; max-width: 46em; }
.ll-muted { color: #5b4a42; font-size: 15px; }

/* ---------- Header and wooden menu ---------- */
.ll-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 24px;
  border-bottom: 2px solid #68463D;
}
.ll-logo { display: block; flex: 0 0 auto; }
.ll-logo img { display: block; height: 60px; width: auto; }
.ll-nav { flex: 1 1 auto; }
.ll-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
}
.ll-nav li { position: relative; margin: 0; padding: 0; list-style: none; }
.ll-plank,
.ll a.ll-plank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  height: 46px;
  padding: 0 16px;
  border: 0;
  background: url(../images/houtenknop.png) center / 100% 100% no-repeat;
  font-family: 'cabinsketchbold', 'Cabin Sketch', cursive;
  font-weight: normal;
  font-size: 19px;
  color: #4a2f27;
  text-decoration: none;
  cursor: pointer;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}
.ll a.ll-plank:hover { color: #1f130f; }
.ll a.ll-plank.is-active { text-decoration: underline; text-decoration-thickness: 2px; }
.ll-caret { width: 12px; height: 12px; flex: 0 0 auto; }
.ll-menu-btn { display: none; }
.ll-menu-btn[aria-expanded="true"] .ll-icon-open,
.ll-menu-btn:not([aria-expanded="true"]) .ll-icon-close { display: none; }

/* Desktop: sub items in a dropdown on hover or keyboard focus. */
.ll-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 210px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: rgba(253, 241, 230, 0.98);
  border: 1px solid #68463D;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.ll-nav li.has-sub:hover > .ll-sub,
.ll-nav li.has-sub:focus-within > .ll-sub { display: block; }
.ll-sub a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 600;
  text-decoration: none;
}
.ll-sub a:hover { background: rgba(104, 70, 61, 0.08); }

/* ---------- Shared bits ---------- */
.ll-card {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(104, 70, 61, 0.55);
  border-radius: 18px;
  overflow: hidden;
}
.ll-btn,
.ll a.ll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: #A84B23;
  color: #fff;
  font: 700 17px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.ll a.ll-btn:hover, .ll-btn:hover { background: #8a3a18; color: #fff; }
.ll-btn-ghost,
.ll a.ll-btn-ghost {
  background: transparent;
  color: #7a3517;
  border: 2px solid #68463D;
}
.ll-btn-ghost:hover, .ll a.ll-btn-ghost:hover { background: rgba(104, 70, 61, 0.08); color: #4a2f27; }
.ll-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ll-chips[hidden] { display: none; }
.ll-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid #68463D;
  background: rgba(255, 255, 255, 0.55);
  color: #4a2f27;
  font: 700 16px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
}
.ll-chip[aria-pressed="true"] { background: #68463D; color: #fff; }
.ll-count { font-weight: 400; opacity: 0.85; }
.ll-bar { display: block; height: 8px; border-radius: 99px; background: rgba(104, 70, 61, 0.18); overflow: hidden; }
.ll-bar > span { display: block; height: 100%; border-radius: 99px; background: #4E7A2E; }
.ll-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.ll-pill-4dringend { background: #A84B23; color: #fff; }
.ll-pill-3oogsten { background: #3F6B22; color: #fff; }
.ll-pill-2binnenkort { background: #c9a227; color: #2f2420; }
.ll-pill-1niet { background: #E9DDD0; color: #4a3a33; }
.ll-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.ll-field { display: flex; flex-direction: column; gap: 6px; }
.ll-field label { font-weight: 700; font-size: 15px; color: #3a2a23; }
.ll-inline { display: flex; gap: 10px; }

/* Form controls (front-end forms: webform, recipe form, login). */
.ll-select,
.ll input.form-text,
.ll input.form-email,
.ll input.form-tel,
.ll input.form-number,
.ll input.form-password,
.ll select.form-select,
.ll textarea.form-textarea {
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid #68463D;
  border-radius: 10px;
  background: #fff;
  color: #2f2420;
  font: 400 17px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  max-width: 100%;
}
.ll input.form-text,
.ll input.form-email,
.ll input.form-tel,
.ll input.form-password { width: 100%; max-width: 32em; }
.ll .container-inline select.form-select { width: auto; min-width: 5.5em; }
.ll input:focus, .ll select:focus, .ll textarea:focus { outline: 3px solid #B6562C; outline-offset: 1px; }
.ll .form-required { color: #A84B23; }
.ll input.form-submit,
.ll button.form-submit {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: #A84B23;
  color: #fff;
  font: 700 17px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
}
.ll input.form-submit:hover, .ll button.form-submit:hover { background: #8a3a18; }

/* ---------- Pages with a sidebar (home) ---------- */
.ll-home { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.ll-content { min-width: 0; }
.ll-side .region { display: flex; flex-direction: column; gap: 30px; }
.ll-side .block { margin: 0; }

/* Front page body (pasted content with inline font sizes). */
.front .ll-content .field-name-body img { display: block; width: 100%; max-width: 760px; height: auto; }
.front .ll-content .field-name-body p,
.front .ll-content .field-name-body div,
.front .ll-content .field-name-body span {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}
.front .ll-content .field-name-body { font-size: 20px; }
.front .ll-content .field-name-body p { margin: 0 0 0.8em; }
.ll-video-embed { width: 100%; max-width: 700px; aspect-ratio: 16 / 9; margin: 1.5em 0; }
.ll-video-embed iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 16px; background: #000; }

/* Sidebar: recipe tile. */
.ll a.ll-recipe-tile { display: block; color: #2f2420; text-decoration: none; }
.ll-recipe-tile img { display: block; width: 100%; height: 160px; object-fit: cover; }
.ll-recipe-tile-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }

/* Sidebar: crops to harvest urgently (view binnekortteoogsten). */
.view-binnekortteoogsten .view-content { display: flex; flex-direction: column; gap: 10px; }
.view-binnekortteoogsten .views-row { display: flex; align-items: center; gap: 14px; min-height: 56px; }
.view-binnekortteoogsten .views-field-field-afbeelding img {
  display: block;
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}
.view-binnekortteoogsten .views-field-title a { font-weight: 700; }

/* Sidebar: activity teaser (node 2). */
#block-lekkerland-activiteit .node-teaser {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(104, 70, 61, 0.55);
  border-radius: 18px;
  padding: 16px 18px 8px;
}
#block-lekkerland-activiteit .node-teaser p { margin: 0 0 0.6em; font-size: 15px; }
#block-lekkerland-activiteit .field-name-node-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}
#block-lekkerland-activiteit .field-name-node-link a::after { content: '...'; }

/* ---------- Oogsten (/gewassen) ---------- */
.view-lijst-gewassen.view-display-id-page_1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  grid-template-areas: "content header";
  gap: 36px;
  align-items: start;
}
.view-lijst-gewassen.view-display-id-page_1 > .view-header { grid-area: header; }
.view-lijst-gewassen.view-display-id-page_1 > .view-content { grid-area: content; min-width: 0; }
.ll-map { margin: 0; }
.ll-map a { display: block; }
.ll-map img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid #68463D; }
.ll-map figcaption { margin-top: 8px; font-size: 14px; color: #5b4a42; }
.ll-rows { margin-top: 20px; border-top: 2px solid #68463D; }
.ll-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "name status veld";
  gap: 4px 16px;
  align-items: center;
  min-height: 50px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(104, 70, 61, 0.2);
}
.ll-row[hidden] { display: none; }
.ll-row-head { min-height: 44px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #5b4a42; }
.ll-row-name { grid-area: name; font-weight: 700; }
.ll-row-status { grid-area: status; }
.ll-row-veld { grid-area: veld; color: #4a3a33; }
.ll-status-summary { margin-top: 14px; }
.ll .views-table { width: 100%; max-width: 500px; }

/* ---------- Recepten ---------- */
.ll-toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.ll-crop-filter { min-width: 260px; }
.ll-rgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ll-rcard { display: flex; flex-direction: column; }
.ll-rcard[hidden] { display: none; }
.ll-rcard-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #e3d4c4; }
.ll-rcard-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ll-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #7a6358; }
.ll-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #3F6B22;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 4px 12px;
}
.ll-rcard-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.ll-rcard-body .ll-h3 a { color: #7a3517; text-decoration: none; }
.ll-rcard-body .ll-h3 a:hover { text-decoration: underline; }
.ll-crops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ll-crops li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(63, 107, 34, 0.12);
  color: #2f4f19;
}
.ll-crops li.is-not-available { background: #E9DDD0; color: #5b4a42; }
.ll-more { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin-top: 30px; }
.ll-more [hidden] { display: none; }

/* ---------- Lid worden (webform node) ---------- */
.node-webform .field-name-body table { display: block; width: auto !important; margin: 0 0 1em; }
.node-webform .field-name-body colgroup { display: none; }
.node-webform .field-name-body table,
.node-webform .field-name-body tbody,
.node-webform .field-name-body tr { height: auto !important; }
.node-webform .field-name-body tbody {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 13em));
  gap: 0 24px;
}
.node-webform .field-name-body tr {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed rgba(104, 70, 61, 0.35);
}
.node-webform .field-name-body td { padding: 6px 0; width: auto !important; height: auto !important; }
.node-webform .field-name-body td + td { font-weight: 700; font-variant-numeric: tabular-nums; }

.ll .webform-submission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 2px solid #68463D;
}
.ll .webform-submission-form > * { margin: 0; min-width: 0; }
.ll .webform-submission-form > fieldset,
.ll .webform-submission-form > .form-actions,
.ll .webform-submission-form > input[type="hidden"] { grid-column: 1 / -1; }
.ll .webform-submission-form .form-item { margin: 0; }
.ll .webform-submission-form fieldset.collapsible {
  display: flow-root;
  margin: 0;
  padding: 0 18px;
  border: 1px solid rgba(104, 70, 61, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.ll .webform-submission-form fieldset.collapsible > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0;
}
.ll .webform-submission-form fieldset.collapsible .fieldset-legend {
  display: flex;
  align-items: center;
  min-height: 54px;
  font-family: 'cabinsketchbold', 'Cabin Sketch', cursive;
  font-size: 22px;
}
.ll .webform-submission-form fieldset.collapsible .fieldset-title { color: #7a3517; text-decoration: none; }
/* Fields side by side with inline-block (collapse.js slides the wrapper). */
.ll .webform-submission-form fieldset.collapsible > .fieldset-wrapper {
  clear: both;
  margin: 0 -10px;
  padding: 4px 0 18px;
}
.ll .webform-submission-form fieldset.collapsible > .fieldset-wrapper > .form-item {
  display: inline-block;
  vertical-align: top;
  width: calc(100% / 3 - 0.3em);
  padding: 0 10px 14px;
}
.ll .webform-submission-form fieldset.collapsed > .fieldset-wrapper { display: none; }
/* D7 system.base.css squeezes collapsed fieldsets to 1em high, without side borders. */
html.js .ll .webform-submission-form fieldset.collapsed { height: auto; border-width: 1px; }
.ll .webform-submission-form .form-actions { margin-top: 8px; }

/* ---------- Other pages that had fixed widths ---------- */
.node-fotoverslag .field-name-field-afbeelding { width: auto; max-width: 800px; }

/* ---------- Tablet ---------- */
@container ll (max-width: 1000px) {
  .ll-rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-lijst-gewassen.view-display-id-page_1 { grid-template-columns: minmax(0, 1fr) 320px; }
  .ll .webform-submission-form fieldset.collapsible > .fieldset-wrapper > .form-item { width: calc(50% - 0.3em); }
}
@container ll (max-width: 880px) {
  .ll-home { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ll-side .region { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .view-lijst-gewassen.view-display-id-page_1 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "content"; }
  .ll-map img { max-height: 420px; object-fit: cover; }
  .node-webform .field-name-body tbody { grid-template-columns: repeat(2, minmax(0, 13em)); }
}

/* ---------- Phone ---------- */
@container ll (max-width: 640px) {
  .ll { font-size: 16px; background-attachment: scroll; }
  .ll-shell { padding: 0; }
  .ll-panel { border-radius: 0; box-shadow: none; }
  .ll-main { padding: 22px 18px 30px; }
  .ll-h1, .ll h1.page__title { font-size: 36px; }
  .ll-h2, .ll-side .block__title { font-size: 26px; }
  .ll-intro { font-size: 17px; }

  .ll-header { padding: 10px 14px; gap: 10px; }
  .ll-logo img { height: 46px; }
  .ll .ll-menu-btn { display: inline-flex; margin-left: auto; min-width: 0; padding: 0 18px; font-size: 18px; }
  .ll-nav { display: none; flex-basis: 100%; }
  .ll-nav.is-open { display: block; }
  .ll-nav > ul { flex-direction: column; flex-wrap: nowrap; gap: 8px; padding: 6px 0 10px; }
  .ll a.ll-plank { width: 100%; height: 52px; justify-content: flex-start; padding: 0 22px; font-size: 21px; }
  .ll-caret { display: none; }
  .ll-sub,
  .ll-nav li.has-sub:hover > .ll-sub,
  .ll-nav li.has-sub:focus-within > .ll-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
    position: static;
    min-width: 0;
    margin: 2px 0 4px;
    padding: 0 22px;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .ll-sub a { padding: 0; }
  .ll-sub a:hover { background: none; }

  .front .ll-content .field-name-body { font-size: 18px; }
  .ll-side .region { display: flex; flex-direction: column; gap: 28px; }
  .view-binnekortteoogsten .view-content {
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }
  .view-binnekortteoogsten .views-row {
    flex: 0 0 140px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    scroll-snap-align: start;
  }
  .view-binnekortteoogsten .views-field-field-afbeelding img { width: 140px; height: 96px; }

  .ll-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "veld status"; padding: 10px 4px; min-height: 64px; }
  .ll-row-head { display: none; }
  .ll-row-veld { font-size: 14px; }
  .ll-chip { font-size: 15px; padding: 0 14px; }

  .ll-rgrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ll-rcard { flex-direction: row; }
  .ll-rcard-img { flex: 0 0 112px; aspect-ratio: auto; min-height: 128px; }
  .ll-badge { left: 6px; top: 6px; font-size: 12px; padding: 2px 8px; }
  .ll-rcard-body { padding: 10px 12px 12px; gap: 8px; }
  .ll-rcard-body .ll-h3 { font-size: 19px; }
  .ll-rcard .ll-bar { display: none; }
  .ll-crops li { font-size: 13px; }
  .ll-toolbar { flex-direction: column; align-items: stretch; }
  .ll-toolbar .ll-btn, .ll-crop-filter { width: 100%; min-width: 0; }
  .ll-inline .ll-select { flex: 1 1 auto; }

  .node-webform .field-name-body tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .field--widget-entity-reference-paragraphs .paragraphs-subform { flex-direction: column; gap: 10px; }
  .field--widget-entity-reference-paragraphs .paragraphs-subform > .form-wrapper { width: 100%; }
  .field--widget-entity-reference-paragraphs .paragraphs-subform > .field--name-field-hoeveelheid { padding-left: 0; }
  .ll .webform-submission-form { grid-template-columns: minmax(0, 1fr); }
  .ll .webform-submission-form fieldset.collapsible { padding: 0 14px; }
  .ll .webform-submission-form fieldset.collapsible > .fieldset-wrapper > .form-item { width: 100%; }
  .ll .webform-submission-form .form-submit { width: 100%; }
}
