/* The request form on /momenten/<type>: the weekend calendar, start and end time, and the company
   block. Builds on forms.css (.mf) and the site-wide .field. No borders, square corners; the only
   round shapes are the day circles. Without JavaScript throughout. */

/* A default send button first in the form, out of sight: Enter in any field sends the request,
   not the VAT lookup that comes earlier in the form. */
.mr-default { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.mr-legend-note { display: block; margin-top: 4px; }

/* Company block: shown when "Bedrijf" is chosen (with :has; browsers without it simply show it). */
.mr-b2b { display: grid; gap: 22px; padding: 22px; background: rgba(255, 255, 255, 0.28); scroll-margin-top: 120px; }
.mf:has(input[name='audience'][value='particulier']:checked) .mr-b2b { display: none; }
.mr-b2b > p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.mr-b2b textarea { min-height: 76px; }
.mr-search { display: grid; grid-template-columns: 1fr auto; }
.mr-search .button { min-height: 48px; }
.mr-found { padding: 14px 18px; background: rgba(255, 255, 255, 0.7); color: var(--ink) !important; }
.mr-found strong { font-weight: 500; }

/* Selects: the site field, with a fine chevron drawn by two gradients. */
.mr select {
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 21px) 50%, calc(100% - 16px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* A fieldset grows with its content by default: keep the one around the calendar at the width of
   the form, so the row of months scrolls inside it instead of widening the page on a phone. */
fieldset:has([data-calendar]) { min-inline-size: 0; }
[data-calendar] { min-width: 0; }

/* Calendar: months side by side; on a phone one month and a bit of the next, swiped sideways. */
.cal {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(84%, 300px);
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}
@media (min-width: 760px) {
  .cal { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; row-gap: 32px; }
}
/* Before the first bookable month (calendar.js BOOK_FROM): a white button in the middle of the
   first row of faint months; it jumps to the first open month and then steps aside. */
.cal { position: relative; }
.cal-note {
  position: absolute;
  z-index: 1;
  top: 150px;
  left: 50%;
  translate: -50% -50%;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: var(--radius-field);
  background: #fff;
  box-shadow: 0 6px 24px rgba(32, 34, 30, 0.08);
  color: var(--ink);
  font-size: var(--t-small);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.4s ease;
}
.cal-note::after { content: ' \2192'; }
.cal-note:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.cal:has(.cal-month:target) .cal-note { opacity: 0; pointer-events: none; }
@media (max-width: 759px) {
  /* inside the row that slides sideways: centred on the first month that shows */
  .cal-note { left: calc(min(84%, 300px) / 2 + 2px); max-width: calc(min(84%, 300px) - 16px); }
}
.cal-month { scroll-snap-align: start; min-width: 0; scroll-margin: 120px 0 0; }
.cal-month:target .cal-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cal-title { margin: 0 0 10px; font: 400 15px/1.3 var(--serif); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-dow { padding-bottom: 6px; font-size: var(--t-micro); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); }
.cal-off, .cal-pad { display: grid; place-items: center; aspect-ratio: 1; color: var(--ink-2); opacity: 0.4; }
.cal-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.cal-day input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cal-day span {
  display: grid;
  place-items: center;
  width: min(38px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font-weight: 500;
  transition: background-color 0.5s ease, color 0.5s ease;
}
.cal-day:hover span { background: rgba(255, 255, 255, 0.95); }
.cal-day input:checked + span { background: var(--ink); color: var(--paper); }
.cal-day input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }

.mr-privacy { margin: 0; font-size: var(--t-small); color: var(--ink-2); }
.mr-privacy a { color: inherit; }
