:root {
  --color-primary: #0073aa;
  --color-secondary: #005177;
  --color-background: #f4f4f4;
  --color-green: #28a745;
  --color-text: #333;
  --color-support: #eaeaea;
  --color-border: #ccc;
  --color-black: #000;
  --color-white: #fff;
  --color-white-light: #f9f9f9;
  --color-white-dark: #eaeaea;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Visual Composer compatibility fixes */
.vc_row:has(.reservering-form),
.wpb_row:has(.reservering-form),
.vc_column:has(.reservering-form),
.wpb_column:has(.reservering-form),
.vc_column_container:has(.reservering-form),
.wpb_column_container:has(.reservering-form) {
  position: relative !important;
  overflow: visible !important;
  height: auto !important;
}

.reservering-form {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--color-text);
  position: relative !important; /* Ensures sticky context */
  overflow: visible !important;
}

/* Layout - Sticky (side by side) */
.reservering-form.layout-sticky .reservering-container {
  display: flex !important;
  flex-direction: row;
  gap: 1rem;
  align-items: stretch !important; /* Zorgt ervoor dat kolommen gelijke hoogte krijgen */
  position: relative !important;
  overflow: visible !important;
}

.reservering-form.layout-sticky .reservering-form-content {
  flex: 0 0 66.666% !important;
  max-width: 66.666% !important;
  position: relative !important;
  overflow: visible !important;
}

.reservering-form.layout-sticky .reservering-summary {
  flex: 0 0 33.333% !important;
  max-width: 33.333% !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: visible !important;
}

/* Layout - Stacked (under each other) */
.reservering-form.layout-stacked .reservering-container {
  display: block;
}

.reservering-form.layout-stacked .reservering-form-content {
  width: 100%;
  margin-bottom: 2rem;
}

.reservering-form.layout-stacked .reservering-summary {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* Legacy support - oude class names */
.reservering-row {
  display: flex !important;
  flex-direction: row;
  gap: 1rem;
  align-items: stretch !important; /* Zorgt ervoor dat kolommen gelijke hoogte krijgen */
  position: relative !important;
  overflow: visible !important;
}

.reservering-col-left {
  flex: 0 0 66.666% !important;
  max-width: 66.666% !important;
  position: relative !important;
  overflow: visible !important;
}

.reservering-col-right {
  flex: 0 0 33.333% !important;
  max-width: 33.333% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
  height: auto !important;
}

.veld {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background-color: var(---color-background);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 2px 2px 10px var(--shadow);
  transition: all 0.3s ease;
}

/* Disabled/locked state voor stappen */
.veld.disabled {
  opacity: 0.6;
  filter: blur(1px);
  pointer-events: none;
  position: relative;
}

.veld.disabled::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  z-index: 1;
}

.veld.disabled .step {
  background: var(--color-border);
  color: #999;
}

/* Placeholder message voor disabled stappen */
.veld-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
  z-index: 2;
  white-space: nowrap;
}

.veld .step {
  color: var(--color-support);
  text-align: center;
  border-radius: 100%;
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1rem;
  line-height: 1.75rem;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--shadow);
  transition: background 0.3s ease;
  margin-right: 0.25rem;
}

.veld h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 2px solid var(--color-support);
  border-radius: 8px 8px 0 0;
  padding: 1rem 1rem 1rem 2rem;
  margin-top: -2rem;
  margin-left: -2rem;
  margin-right: -2rem;
  margin-bottom: 1rem;
  width: calc(100% + 1rem);

}

.veld p.explaner {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
}

.veld input[type="text"],
.veld input[type="email"],
.veld input[type="tel"],
.veld input[type="password"],
.veld input[type="search"],
.veld input[type="url"],
.veld input[type="date"],
.veld input[type="datetime"],
.veld input[type="datetime-local"],
.veld input[type="month"],
.veld input[type="week"],
.veld input[type="time"],
.veld input[type="number"],
.veld input[type="range"],
.veld input[type="color"],
.veld input[type="file"],
.veld textarea {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  /* background: var(--color-background); */
  font-size: 1rem;
  color: #999;
}


.veld select,
.veld input[type="number"] {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  /* background: var(--color-background); */
  font-size: 1rem;
  color: #999;
}

.veld label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.samenvatting {
  margin-bottom: 1.5rem;
  text-align: left;
}

.samenvatting h4 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.samenvatting ul {
  padding: 0;
  margin:0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-text);
}

.samenvatting ul li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.samenvatting ul li:last-child {
  border-bottom: none;
}


.samenvatting ul li.full-width {
  justify-content: flex-start;
  flex-direction: column;
}

.prijs-detail {
  background: var(--color-white-light);
  color: var(--color-text);
  padding: 0.5rem;
  border-radius: 8px;
}

.prijs-detail h4 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.prijs-detail p {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  margin: 0;
  border-bottom: 1px solid var(--color-white-dark);
  color: var(--color-text);
  font-size: 0.85rem;
}

.prijs-detail span {
  font-weight: 600;
}

.prijs-detail strong {
  display: block;
  margin-top: 1rem;
}


.prijs-detail ul li.full-width {
  justify-content: flex-start;
  flex-direction: column;
}

.totaalblok {
  background: var(--color-white) !important;
  color: var(--color-text);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 16px var(--shadow);
  text-align: center;
  z-index: 999 !important;
  height: fit-content !important;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: block !important;
}

/* Sticky behavior only for sticky layout */
.reservering-form.layout-sticky .totaalblok {
  position: -webkit-sticky !important; /* Safari support */
  position: sticky !important;
  top: 20px !important;
  max-height: calc(100vh - 40px) !important;
  overflow-y: auto;
  will-change: transform !important; /* Optimizes for better performance */
  contain: layout !important; /* Helps with positioning context */
  isolation: isolate !important; /* Creates new stacking context */
}

/* Non-sticky behavior for stacked layout */
.reservering-form.layout-stacked .totaalblok {
  position: static !important;
  width: 100%;
  margin-bottom: 1rem;
}

.totaalblok:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.arrangementen-sectie {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.arrangement-groep h4 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25rem;
}

.arrangement label {
  padding: 0.5rem 0.5rem;
  border: 1px solid var(--color-support);
  border-radius: 6px;
  /* background: var(--color-background); */
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-weight: 300;
  font-size: 1rem;
}

.arrangement-label {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--color-support);
  border-radius: 6px;
  background-color: var(--color-background);
  transition: background-color 0.2s ease;
  cursor: pointer;
}

/* Highlight als geselecteerd */
.arrangement-label:has(input:checked) {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}


.melding {
  color: #b30000;
  background: #ffe5e5;
  padding: 0.5em;
  border: 1px solid #ffb3b3;
  border-radius: 4px;
  font-size: 0.9em;
  margin-top: 0.5em;
}

.form-loader {
  background: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  padding: 1em;
  text-align: center;
  border: 1px solid #ddd;
  margin: 1em 0;
}

.noUi-target {
  background: var(--color-support); /* track achtergrond */
  border-radius: 4px;
  height: 8px;
  margin-top: 0.75rem;
}

.noUi-connect {
  background: var(--color-primary); /* actieve track */
}

.noUi-handle {
  width: 18px !important;
  height: 18px !important;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--shadow);
  top: -12px; /* vertical center */
  cursor: pointer;
  transition: background 0.2s ease;
}

.noUi-handle::before,
.noUi-handle::after {
  display: none;
}

.noUi-handle:hover {
  background: var(--color-secondary);
}

.noUi-handle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

#verstuur-aanvraag {
  background: var(--color-green);
  color: var(--color-white);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-align: center;
  display: block;
  width: 100%;
  border: none;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
}

#verstuur-aanvraag:hover {
  background: var(--color-secondary);
}
#verstuur-aanvraag:disabled {
  background: var(--color-support);
  color: var(--color-text);
  cursor: not-allowed;
}

.aanvraag-bedankt {
  background: var(--color-white);
  color: var(--color-text);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 16px var(--shadow);
}

.aanvraag-bedankt h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-support);
  padding-bottom: 0.5rem;
}

.aanvraag-bedankt h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-support);
  padding-bottom: 0.5rem;
}

.aanvraag-bedankt dl {
  margin: 0 0 1.5rem 0;
  padding: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--color-text);
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.aanvraag-bedankt dt {
  font-weight: 600;
  margin-bottom: 0;
  flex: 0 0 30%;
}
.aanvraag-bedankt dd {
  margin: 0;
  padding: 0;
  flex: 0 0 65%;
  color: var(--color-text);
}

.aanvraag-bedankt .kostenoverzicht {
  margin: 0;
  padding: 0;
  list-style: none;
}

.accordion-toggle {
  cursor: pointer;
  background: var(--color-white-light);
  border: none;
  color: var(--color-text);
  padding: 0.75rem;
  border-radius: 8px;
  text-align: left;
  font-size: 1.125rem;
  font-weight: bold;
  transition: background 0.3s ease;
  display: block;
  width: 100%;
  z-index: 2;
  position: relative;
}

.accordion-toggle::after {
  content: "+";
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.accordion-toggle:active::after {
  content: "-";
}

.accordion-content  {
  display: none;
  padding: 1rem;
  border: 1px solid var(--color-white-light);
  border-radius: 8px;
  background: var(--color-white);
  margin-bottom: 1rem;
  margin-top: -1rem;
  z-index: 1;
  position: relative;
}

.arrangementen-accordion h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.arrangementen-accordion label {
  display: block;
  padding: 0.5rem;
  border: 1px solid var(--color-support);
  border-radius: 6px;
  background-color: var(--color-background);
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.arrangement-omschrijving {
  display: block;
  font-style: italic;
  font-size: 0.9em;
  color: #666;
  margin-top: 0.25em;
}


.arrangement-blok {
  margin-bottom: 3rem;
}

.arrangement-blok h4 {
  font-size: 1.25rem;
  color: #006ca9;
  margin: 2rem 0 0.5rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
}

.arrangement-details {
  background: #f8f8f8;
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
}

.arrangement-details summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  font-size: 1.1rem;
  list-style: none;
}

.arrangementen-sectie {
  margin-top: 0.5rem;
}

.arrangement {
  background: white;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.arrangement:hover {
  border-color: #006ca9;
}

.arrangement-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4;
}

.arrangement-label input[type="checkbox"] {
  margin-top: 0.2rem;
}

.arrangement-omschrijving {
  display: block;
  font-style: italic;
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.3rem;
}

/* Direct geplaatste arrangementen (zonder subtype) */
.direct-arrangement {
  background: white;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.direct-arrangement:hover {
  border-color: #006ca9;
}

/* Arrangement header met info knop */
.arrangement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.arrangement-header .arrangement-label {
  flex: 1;
}

/* Arrangement title styling */
.arrangement-title {
  font-weight: 400;
  line-height: 1.4;
}

/* Info toggle knop */
.info-toggle {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.info-toggle:hover {
  background: #e0e0e0;
  border-color: #999;
  color: #333;
}

.info-toggle i {
  font-style: normal;
  font-weight: bold;
}

.sliderveld {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sliderveld input[type="number"] {
  width: 60px;
  padding: 0.3em;
  font-size: 1rem;
}

.sliderveld > div {
  flex: 1;
}

.korting-inline {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  color: #555;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .arrangement-selectie {
    padding: 10px;
    margin-bottom: 10px;
  }

  .arrangement-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .arrangement-header h4 {
    font-size: 1.1rem;
  }

  .verwijder-arrangement {
    align-self: flex-end;
    margin-top: 5px;
  }

  .arrangement-checkboxes {
    padding-left: 10px;
    border-left: 2px solid #007cba;
  }

  .arrangement-checkbox-item label {
    font-size: 0.95rem;
  }

  #voeg-arrangement-toe {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
  }
}


/* Tablet layout - tussen 769px en 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .reservering-row {
    gap: 0.75rem;
    align-items: stretch; /* Behoud gelijke hoogte */
  }

  .reservering-col-left {
    flex: 0 0 60%;
    max-width: 60%;
  }

  .reservering-col-right {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    flex-direction: column;
  }

  .totaalblok {
    top: 15px;
    padding: 0.875rem;
  }
}

@media (max-width: 768px) {
  /* Force stacked layout on mobile for both layout types */
  .reservering-form.layout-sticky .reservering-container,
  .reservering-form.layout-stacked .reservering-container {
    display: block !important;
  }

  .reservering-form.layout-sticky .formulier-kolom,
  .reservering-form.layout-sticky .totaal-kolom,
  .reservering-form.layout-stacked .formulier-kolom,
  .reservering-form.layout-stacked .totaal-kolom {
    width: 100% !important;
    flex: none !important;
  }

  /* Make totaalblok non-sticky on mobile for both layouts */
  .reservering-form.layout-sticky .totaalblok,
  .reservering-form.layout-stacked .totaalblok {
    position: static !important;
    margin-top: 20px;
    z-index: 20;
  }

  /* Legacy mobile support */
  .reservering-row {
    flex-direction: column;
    align-items: stretch;
  }

  .reservering-col-left,
  .reservering-col-right {
    width: 100%;
    padding: 0 !important;
    max-width: 100%;
  }

  .reservering-col-right {
    display: block;
  }
}

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

summary .accordion-icon {
  font-weight: bold;
  font-size: 18px;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

details[open] summary .accordion-icon {
  transform: rotate(45deg); /* optioneel: verander van + naar × of ⌄ als visueel signaal */
}
