/* Late overrides, wordt na style.css en leaflet-maps.css geladen.
   Staat in een eigen bestand omdat de versie-parameter op deze server uit de
   CSS-URL's wordt gestript en browsers dit bestand dus vers ophalen. */

/* --- Zoekformulier /locaties/: postcodeveld en knop over de volle breedte --- */
/* Postcodeveld en knop naast elkaar, 50/50 */
.form.form-locatie .gform_body .gform_fields .gfield--type-address,
.form.form-locatie .gform_body .gform_fields .gfield--type-submit {
  grid-column: span 6 !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.form.form-locatie .gform_body .gform_fields .gfield--type-submit {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
}

.form.form-locatie .gform_body .gform_fields .gfield--type-submit .gf-turnstile-container {
  width: 100%;
  margin: 0;
}

.form.form-locatie .gform_body .gform_fields .gfield--type-submit .gform-button,
.form.form-locatie .gform_body .gform_fields .gfield--type-submit .button {
  display: flex;
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* --- Sorteerregel onder de filters --- */
.locaties__sorteerregel {
  margin-top: 0.9375rem;
}

/* Invoervelden binnen de border houden, zodat veld en knop exact even breed zijn */
.form.form-locatie .gform_body .ginput_container input {
  box-sizing: border-box;
  max-width: 100%;
}

/* Gravity zet -2,75px marge op het adresblok; daardoor stak het veld 6px buiten
   de kolom en leken veld en knop niet even breed. */
.form.form-locatie .gform_body .ginput_container.ginput_complex {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Op smalle schermen weer onder elkaar, anders wordt de knop te krap */
@media (max-width: 767px) {
  .form.form-locatie .gform_body .gform_fields .gfield--type-address,
  .form.form-locatie .gform_body .gform_fields .gfield--type-submit {
    grid-column: 1 / -1 !important;
  }
}

/* --- Header-dropdowns: breedte op de inhoud in plaats van op de breedte van
   het menu-item. "Tarieven" is smal, waardoor het submenu 113px breed werd en
   de items (met padding en het oranje bolletje) eruit liepen. --- */
section.header .nav ul li.menu-item .sub-menu {
  width: auto !important;
  min-width: 240px;
  left: 0;
  right: auto;
}

section.header .nav ul li.menu-item .sub-menu li a::before {
  flex: 0 0 6px;
}

/* --- Tarieven in de topbar (links van Aanvullende voorwaarden) --- */
.topbar-tarieven {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.topbar-tarieven__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 21px;
  color: #002f87;
  text-decoration: none;
}

.topbar-tarieven__toggle:hover {
  text-decoration: underline;
}

.topbar-tarieven__toggle svg {
  transition: transform 0.2s ease-in-out;
}

.topbar-tarieven:hover .topbar-tarieven__toggle svg,
.topbar-tarieven:focus-within .topbar-tarieven__toggle svg {
  transform: rotate(180deg);
}

.topbar-tarieven__menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2147483000;
  display: none;
  flex-direction: column;
  width: max-content;
  min-width: 180px;
  padding: 6px 0;
  background-color: #fcf8f5;
  border: 1px solid rgba(0, 47, 135, 0.08);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.topbar-tarieven:hover .topbar-tarieven__menu,
.topbar-tarieven:focus-within .topbar-tarieven__menu {
  display: flex;
}

.topbar-tarieven__menu a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  line-height: 20px;
  color: #002f87;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-tarieven__menu a:hover {
  background-color: rgba(0, 47, 135, 0.07);
  text-decoration: underline;
}

/* De Cloudflare-Turnstile-widget is 71px hoog en duwt de knop uit lijn met het
   postcodeveld. Widget uit de flow halen en onder de knop tonen. */
.form.form-locatie .gform_body .gform_fields .gfield--type-submit {
  position: relative;
}

.form.form-locatie .gform_body .gform_fields .gfield--type-submit .gf-turnstile-container {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
}
