/* ==========================================================================
   Vloercoatingwijzer — front styling (Bootstrap 5 / Hummingbird child brand).
   The radio is visually hidden; its label is a clickable card. Selected state
   gets an amber outline (brand --dhz-amber, with a literal fallback).
   ========================================================================== */
#vloercoatingwijzer .vcw-option {
  cursor: pointer;
  border: 2px solid var(--dhz-border, #ebebeb);
  border-radius: 0.5rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
#vloercoatingwijzer .vcw-option:hover {
  border-color: var(--dhz-amber, #febd69);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* hide the actual radio, keep it accessible */
#vloercoatingwijzer .vcw-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* label fills the card and is the click target */
#vloercoatingwijzer .vcw-option__label {
  height: 100%;
  min-height: 84px;
  margin: 0;
  padding: 1rem;
  cursor: pointer;
  border-radius: 0.4rem;
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--dhz-dark, #1f1f1f);
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* selected tile — :has() lets the radio state restyle its parent card */
#vloercoatingwijzer .vcw-option:has(.vcw-option__input:checked) {
  border-color: var(--dhz-amber, #febd69);
  background: rgba(254, 189, 105, 0.14);
  box-shadow: 0 2px 12px rgba(254, 189, 105, 0.35);
}
#vloercoatingwijzer .vcw-option:has(.vcw-option__input:focus-visible) {
  border-color: var(--dhz-amber, #febd69);
  box-shadow: 0 0 0 3px rgba(254, 189, 105, 0.5);
}
/* fallback for browsers without :has() — outline the label */
@supports not selector(:has(*)) {
  #vloercoatingwijzer .vcw-option__input:checked + .vcw-option__label {
    outline: 3px solid var(--dhz-amber, #febd69);
    outline-offset: -2px;
  }
}

/* decorative "keus" badge on the first recommended product */
#vloercoatingwijzer_result #feature-grid .product_item:first-child .product-thumbnail {
  position: relative;
}
#vloercoatingwijzer_result #feature-grid .product_item:first-child .product-thumbnail:after {
  content: '';
  position: absolute;
  bottom: 8px;
  right: -8px;
  width: 80%;
  height: 100%;
  background-size: contain;
  background-image: url(/modules/bw_vloercoatingwijzer/views/img/vloercoating-keus.png);
  background-repeat: no-repeat;
  background-position: bottom right;
  pointer-events: none;
}
