/* Alle calculators verbergen en centraal positioneren */
[id^="ccb_app_"] {
  display: none !important;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000001;
  width: 90%;
  max-width: 600px;
  background: #ffffff00!important;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-height: 90vh;
  overflow-y: auto;
}

[id^="ccb_app_"].visible {
  display: block !important;
}

/* Overlay/backdrop */
.calculator-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000000;
}

.calculator-overlay.visible {
  display: block;
}

.ccb-main-widget {
	min-width:950px!important;
}

/* Close button - BINNEN de calculator */
.calculator-close {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 28px;
  cursor: pointer;
  color: #ffffff;
  background: none;
  border: none;
  padding: 10px;
  line-height: 1;
  z-index: 10000002;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.calculator-close:hover {
  color: #666;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
}

.calculator-button-wrapper {
  margin: 20px 0;
  text-align: center;
}

.calculator-toggle-btn {
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
    color: #FFFFFF;
    background-color: #1F62ADFF;
    border-color: #1F62ADFF;
    width: 100%;
}

.calculator-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ccb-add-to-cart {
	padding: 12px;
	background: var(--ccb-accent-color);
	color: white;
	border: none;
	cursor: pointer;
}

.ccb-add-to-cart:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 950px) {
  [id^="ccb_app_"] {
    top: 12px;
    right: auto;
    bottom: 12px;
    left: 50%;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: none;
    min-width: 0 !important;
    transform: translateX(-50%);
    padding: 14px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
  }

  [id^="ccb_app_"] .ccb-app-container,
  [id^="ccb_app_"] .ccb-page-breaker,
  [id^="ccb_app_"] .ccb-page-breaker__content,
  [id^="ccb_app_"] .ccb-horizontal-layout,
  [id^="ccb_app_"] .ccb-block,
  [id^="ccb_app_"] .ccb-fields-wrapper,
  [id^="ccb_app_"] .ccb-fields-list,
  [id^="ccb_app_"] .ccb-section,
  [id^="ccb_app_"] .ccb-section__content,
  [id^="ccb_app_"] .ccb-section__body,
  [id^="ccb_app_"] .ccb-section__fields,
  [id^="ccb_app_"] .ccb-field,
  [id^="ccb_app_"] .ccb-field__label,
  [id^="ccb_app_"] .ccb-field__input-wrapper,
  [id^="ccb_app_"] .ccb-dropdown,
  [id^="ccb_app_"] .ccb-dropdown__input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  [id^="ccb_app_"] .ccb-horizontal-layout,
  [id^="ccb_app_"] .ccb-fields-list,
  [id^="ccb_app_"] .ccb-section__fields {
    display: block !important;
  }

  [id^="ccb_app_"] .ccb-box-radio.ccb-radio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  [id^="ccb_app_"] .ccb-radio-label {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  [id^="ccb_app_"] .ccb-dropdown__label {
    width: auto !important;
    max-width: 100% !important;
  }

  [id^="ccb_app_"] [data-id="range_field_id_6"] {
    margin-top: 18px !important;
  }

  .calculator-close {
    top: 8px;
    right: 8px;
    color: #1f62ad;
    background: rgba(255,255,255,0.92);
    border-radius: 4px;
  }
}