/* Layout Grid */
.payment-icon {
  width: 40px;
  height: 24px;
  object-fit: contain;
  opacity: 0.7;
}

.payment-option input[type="radio"]:checked ~ .payment-icon,
.payment-option:has(input:checked) .payment-icon {
  opacity: 1;
}

.form-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}

.form-layout-custom {
  padding-left: calc((100vw - var(--container)) / 2);
  max-width: none;
}

.form-section {
  background: #f2f2f2;
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
}

.intro-text {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.intro-text a {
  color: var(--darkblue);
  text-decoration: underline;
}

#bestelformulier .beschikbaarheid-popup-trigger {
  padding: 8px 10px;
  font-size: 17px;
  min-width: 178px;
  height: 38px;
}

.slider-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  display: block;
}

.slider-container {
  position: relative;
  width: 100%;
  margin: 30px 0 30px 0;
}

.slider-track {
  position: relative;
  height: 8px;
  background: #f3c189;
  border-radius: 4px;
  cursor: pointer;
}

.slider-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #ff8c42 0%, #ff6b35 100%);
  border-radius: 4px;
  width: 4.35%;
  /* (3-2)/(25-2) * 100 */
  transition: width 0.1s ease;
  pointer-events: none;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  left: 4.35%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  border: 3px solid #3e827a;
  background: #266257;
  border-radius: 50%;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: left 0.1s ease;
  user-select: none;
  z-index: 10;
}

.slider-thumb:active {
  cursor: grabbing;
}

.slider-info {
  text-align: right;
  margin-top: 15px;
  font-size: 14px;
  color: #666;
  display: none;
}

.slider-info .info-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #ccc;
  border-radius: 50%;
  text-align: center;
  line-height: 16px;
  font-size: 12px;
  color: white;
  margin-left: 5px;
  cursor: help;
}

.card-body h3 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #f3f3f3;
  border-radius: 6px;
  font-size: 15px;
  background: #f3f3f3;
  transition: all 0.3s;
  color: var(--darkblue);
  font-family: "Volkhov";
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #ff8c42;
  background: white;
}

.form-group input::placeholder {
  color: #ccc;
}

.checkbox-group {
  margin: 25px 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.checkbox-item .coupon-hint {
  display: none;
  width: 100%;
  margin-top: 5px;
  margin-left: 36px;
  color: #6c757d;
  font-size: 0.85rem;
}

#coupon:checked ~ .coupon-hint {
  display: block;
}

.checkbox-item input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  cursor: pointer;
}

.checkbox-item label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.total-section {
  text-align: center;
  margin: 40px 0;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 8px;
}

.total-section h4 {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
}

.payment-section {
  margin: 30px 0;
}

.payment-section h4 {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.payment-option {
  padding: 15px;
  border: 2px solid #dfe4e7;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #dfe4e7;
}

.payment-option:hover {
  border-color: #ff8c42;
}

.payment-option input[type="radio"] {
  margin-right: 10px;
}

.payment-option.selected {
  border-color: #ff8c42;
  background: #fff5f0;
}

.terms-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
}

.terms-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.terms-checkbox a {
  color: var(--darkblue);
  text-decoration: underline;
}

.submit-button {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block;
  padding: 18px 40px;
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.submit-button:active {
  transform: translateY(0);
}

.bottom-note {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-size: 14px;
}

/* Cart Summary Styles */
.cart-summary {
  position: sticky;
  top: 0;
  height: auto;
}

.cart-summary-sticky {
  background-image: url("../../../uploads/2025/12/compass-bg.svg");
  background-position: center;
  background-color: var(--darkgreen);
  padding: 100px 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: white;
  height: 100%;
}

.cart-summary h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: white;
  line-height: 1.3;
}

.cart-line-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.cart-line-item-image {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
}

.cart-line-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-item-info {
  flex: 1;
  min-width: 0;
}

.cart-line-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.cart-line-item-row h3 {
  margin-bottom: 5px;
}

.cart-line-item-price {
  font-size: 18px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.cart-subtitle {
  font-size: 14px;
  color: white;
  margin-bottom: 0;
  line-height: 1.5;
}

.cart-items {
  margin-bottom: 25px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.cart-item-name {
  font-size: 16px;
  color: white;
  flex: 1;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cart-item-price {
  font-size: 16px;
  font-weight: 600;
  color: white;
  text-align: right;
}

.cart-divider {
  height: 2px;
  background: rgb(217 172 122);
  margin: 20px 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0;
  margin-bottom: 30px;
}

.cart-total-label {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.cart-total-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cart-total-price {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.cart-total-btw {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.cart-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-feature {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 14px;
  color: white;
  line-height: 1.5;
}

.cart-feature::before {
  content: "";
  display: inline-block;
  min-width: 20px;
  height: 20px;
  background: url("/wp-content/uploads/2026/02/green-check.svg");
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 3px;
  text-align: center;
  line-height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cart-feature span {
  font-weight: 600;
}

@media (max-width: 1024px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .form-layout-custom {
    padding-left: 15px;
    padding-right: 15px;
  }

  .form-layout-custom > form {
    max-width: none;
  }

  .cart-summary {
    width: 100%;
    order: -1;
    position: relative;
    top: 0;
    padding-right: 0;
  }

  .cart-summary-sticky {
    position: relative;
    top: 0;
  }
}

@media (max-width: 980px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 25px;
  }

  /* Verberg cart summary op mobiel */
  .cart-summary {
    display: none;
  }
}

/* Beschikbaarheid Popup */
.beschikbaarheid-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.beschikbaarheid-popup-overlay.is-open {
  display: flex;
}

.beschikbaarheid-popup-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.beschikbaarheid-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition:
    background 0.2s,
    color 0.2s;
}

.beschikbaarheid-popup-close:hover {
  background: #205147;
  color: #fff;
}

.beschikbaarheid-popup-content {
  flex: 1;
  overflow-y: auto;
}

.beschikbaarheid-popup-content .controls-wrapper {
  background: #fff;
}

.beschikbaarheid-popup-content .controls-wrapper.sticky {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  background: #fefbf7 !important;
}

.beschikbaarheid-popup-agenda-wrap {
  padding: 32px 24px;
}

.info-icon {
  position: relative;
  cursor: pointer;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a5579;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.info-icon:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .beschikbaarheid-popup-dialog {
    max-height: 95vh;
    border-radius: 8px;
  }
}

div#pickup-zondag-melding {
  background: rgb(238 129 67);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
}

.bestelformulier-steden {
  padding-top: 100px;
}

@media all and (max-width: 980px) {
  .bestelformulier-steden {
    padding-top: 15px;
  }
  .form-section {
    box-shadow: none;
  }
}

@media (max-width: 767px) {
  .beschikbaarheid-popup-dialog {
    width: 100%;
    height: auto !important;
    max-height: 90dvh;
    border-radius: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    padding-top: 25px;
  }

  .beschikbaarheid-popup-overlay {
    align-items: center;
    padding: 5dvh 16px;
  }

  .beschikbaarheid-popup-content {
    overflow-x: hidden;
  }

  /* Controls header */
  .controls-wrapper > div {
    padding: 12px 16px !important;
    position: relative;
  }

  /* Outer flex verticaal stapelen */
  .controls-wrapper
    .d-flex.flex-wrap.align-items-center.justify-content-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  /* Datum en personen naast elkaar */
  .controls-wrapper .month-wrapper,
  .controls-wrapper .walker-wrapper {
    flex: 1;
    min-width: 0;
  }

  .controls-wrapper .d-flex.align-items-center.gap-3:first-child {
    width: 100%;
    gap: 12px !important;
  }

  /* Legenda verbergen — alleen de directe parent van legend-filter */
  .controls-wrapper .d-flex > .legend-filter:first-child {
    display: none !important;
  }

  .controls-wrapper .d-flex:has(> .legend-filter) {
    display: none !important;
  }

  /* Datum verbergen */
  .controls-wrapper .month-wrapper {
    display: none !important;
  }

  /* Agenda */
  .beschikbaarheid-popup-agenda-wrap {
    padding: 0;
  }

  .agenda-wrapper {
    padding: 16px !important;
  }
}

/* Desktop: absoluut in de popup */
.beschikbaarheid-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ee7b3e;
  color: #fff;
}

/* Mobiel: fixed zodat hij zichtbaar blijft bij scrollen */
@media (max-width: 767px) {
  .beschikbaarheid-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
  }
}
