:root {
  --color-primary: #657b42;
  --color-primary-hover: #3a4824;
  --color-light-grey: #F5F5F5;
  --color-border: #E2E2E2;
  --color-darker-border: #444444;
  --color-light-text: #828282;
  --color-grey-text: #A7A7A7;
  --color-darker-grey-text: #727272;
  --color-dark-background: #333333;
  --color-darker-background: #2b2b2b;
  --color-black-background: #141414;
  --color-placeholder: #CCCCCC;
  --color-text: #333333;
  --color-separator: #3b3b3b;
  --color-red: #e53e3e;
}

/* Garage Configurator UI (Step Builder) */
article {
  background-image: url("/wp-content/uploads/2025/10/Group-630.svg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  background-size: cover;
  background-color: #f5f5f5;
}
#garage-acf-form {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 15px;
}
.entry-content {
  margin: 0;
}
.comment-wrap {
  max-width: 768px;
  margin: auto;
  margin-top:100px;
}
.comment-wrap h3{
  font-size: 26px;
  font-weight: 600;
}
.comment-wrap textarea{
  background: #FFFFFF 0% 0% no-repeat padding-box;
  border: 1px solid #E5E5E5;
  border-radius: 5px;
  height:110px;
}
.entry-header {
  display:none;
}
.custom-header {
  background: var(--color-primary-hover);
  padding: 40px 15px 30px 15px;
  text-align: center;
  color: #fff;
  margin-bottom: 60px;
  background-image: url("/wp-content/themes/kadence-child/assets/images/configurator/house.svg");
  background-repeat: no-repeat;
  background-position: 100%;
  background-size: contain;
}
.custom-header .title {
  font-size: 50px;
  font-weight: 600;
}
.custom-header .text {
  font-size: 24px;
  margin: 0;
}
/* Root UI wrapper */
.cfg-ui {
  --cfg-accent: #657b42;
  --cfg-accent-contrast: #ffffff;
  --cfg-muted: #6b7280;
  --cfg-border: #e5e7eb;
  --cfg-bg: #ffffff;
}

/* Sidebar stepper (left) */
.cfg-steps-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
  align-self: start;

}
.cfg-step-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cfg-border);
  background: var(--cfg-bg);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
  color: #111827;
  user-select: none;
}
.cfg-step-nav-item:hover { border-color: #c7cad1; }
.cfg-step-nav-item .cfg-step-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
  font-size: 12px;
}
.cfg-step-nav-item .cfg-step-label {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfg-step-nav-item.is-active {
  border-color: var(--cfg-accent);
  background: #eef2ff;
  color: #1f2937;
}
.cfg-step-nav-item.is-active .cfg-step-index {
  background: var(--cfg-accent);
  color: var(--cfg-accent-contrast);
}

/* Steps container (right) */

.cfg-step {
  background: transparent;
  border: none;
}
/* Hide inactive step panes (synced with JS aria-hidden) */
.cfg-step[aria-hidden="true"] { display: none; }

.cfg-step-title {
  margin: 0 0 50px 0;
  font-size: 40px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

.cfg-fields { display: block; margin-bottom:30px;}
.cfg-field-group {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.cfg-field {
  width:calc(33% - 16px);
}
.cfg-step[data-step-id="contact"] .cfg-field {
  width:auto;
}
.column-4 .cfg-field {
  width:calc(25% - 23px);
}
.column-1 .cfg-field {
  width:50%;
}
.cfg-field-group.column-center {
  justify-content: center;
}
.cfg-field label{
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
  cursor: pointer;
  align-items: center;
}
.cfg-field label.no-select{
  cursor: default;
}
.cfg-field .image-wrap{
  border:1px solid #E5E5E5;
  background: #FFF;
  border-radius: 5px;
  padding:0px;
  height:221px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}
.cfg-field .image-wrap .hormann-logo{
  height:16px;
  width:auto;
  position: absolute;
  bottom:0;
}
.facade .image-wrap{
  width:200px;
  height:200px;
}
.cfg-field label .image-wrap img , .cfg-field label .image-wrap svg {
  max-height:129px;
  width: auto;
}
.title-extra-text {
  text-align: center;

}
.cust-window {
  display:flex;
  justify-content: space-between;
  align-items: center;
  border-bottom:1px solid #E5E5E5;
  padding-bottom:5px;
  padding-top:15px;
}
.cust-window .text{
  font-weight: 600;

}
.rating-wrapp {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #E5E5E5;
  width: fit-content;
  margin: auto;
  align-items: center;
  padding-left:15px;
  padding-right:15px;
}
.rating-wrapp .rating-row {
  margin:0;
}
.rating-wrapp p {
  margin:0;
  font-size: 14px;
}
.rating-wrapp .rating-container {
  display: flex
;
  gap: 5px;
}
.facade label .image-wrap img, .facade label .image-wrap svg {
  max-height:unset;
  object-fit: cover;
  height: 100%;
}
.cfg-field label input ~ .image-wrap img, .cfg-field label input ~ .image-wrap svg {
  opacity: 0.6;
}
.image-wrap img.greyscale, .image-wrap svg.greyscale {
  filter: grayscale(100%);
}
.cfg-field label span.text {
  font-size: 16px;
  font-weight: 600;
  color:var(--color-text);
}
.cfg-field label input ~ span.text {
  opacity: 0.6;
}
.cfg-field input[type="radio"] {
  display:none;
}
.cfg-field input[type="radio"]:checked ~ .image-wrap {
  border-color: var(--color-primary);
  border-width: 2px;
}
.cfg-field input[type="radio"]:checked ~ .image-wrap img, .cfg-field input[type="radio"]:checked ~ .image-wrap svg {
  opacity: 1;
}
.cfg-field input[type="radio"]:checked ~ .text {
  color: var(--color-primary);
  opacity: 1;
}
/* Inputs */
.cfg-field input[type="text"],
.cfg-field input[type="email"],
.cfg-field input[type="tel"],
.cfg-field input[type="number"],
.cfg-field select,
.cfg-field textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--cfg-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.cfg-field input[type="text"]:focus,
.cfg-field input[type="email"]:focus,
.cfg-field input[type="tel"]:focus,
.cfg-field input[type="number"]:focus,
.cfg-field select:focus,
.cfg-field textarea:focus {
  border-color: var(--cfg-accent);
  /*box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);*/
}
.cfg-field label > input[type="checkbox"],
.cfg-field label > input[type="radio"] { margin-right: 8px; }

/* Grid for multi-column fields */
.cfg-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mix-doors {
  margin-top:10px;
}
.mix-doors .door-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom:10px;
}
.mix-doors .door-input-wrap input {
  width: 40px;
  text-align: center;
  background: transparent;
  padding:8px 0;
}
.mix-doors .door-input-wrap img ,.mix-doors .door-input-wrap svg {
  width:20px;
  padding:5px;
  cursor: pointer;
}
.mix-doors .door-input-wrap {
  display: flex;
  gap: 10px;
}
/* Actions (bottom buttons) */
.cfg-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 0;
  grid-column: 1 / -1;
}
.cfg-next {
  margin-left:auto;
}
.cfg-prev,
.cfg-next,
#garage-acf-form .cfg-submit {
  appearance: none;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #FFF;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .02s;
  display: flex;
  gap:10px;
}
#garage-acf-form .cfg-submit {
  padding: 20px 50px;
  margin: 0;
}
#garage-acf-form .cfg-submit:hover {
  border: 1px solid var(--color-primary-hover);
  background: var(--color-primary-hover);
}
.cfg-prev {
  border:none;
  color: var(--color-primary);
  background: transparent;
  font-weight: 600;
}

.cfg-next {
  padding:20px 50px;
}

.cfg-next:hover { background: var(--color-primary-hover); }


.rating-row {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 10px;
}

.rating-row .star-rating-selector label {
  font-weight: 500;
  margin: 0;

}

.stars-input {
  display: flex;
  flex-direction: row-reverse;
  gap: 5px;
}

.stars-input input {
  display: none;
}

.stars-input label {
  font-size: 22px;
  color: #ccc;
  cursor: pointer;
  transition: color 0.2s;

}

.stars-input input:checked ~ label,
.stars-input label:hover,
.stars-input label:hover ~ label {
  color: #3a4824;
}

/* Star rating container */
.star-rating-selector {
  display: inline-flex;
  flex-direction: row;
  gap: 5px;
  position: relative;
}
.cfg-success {
  text-align: center;
}
.star-rating-selector input {
  display: none;
}
.rating-container .star-rating-selector:not(:checked) label.checkbox:before {
  display:none!important;
}

.star-rating-selector:not(:checked) label.checkbox {
  text-indent: 0px!important;
}



/* Color when selected */
.star-rating-selector:not(:checked) input:checked ~ label.checkbox {
  color: #657b42;
}
/* Field validation errors */
input.field-error,
select.field-error,
textarea.field-error {
  border-color: #e11d48 !important;
  /*box-shadow: 0 0 0 3px rgba(225, 29, 72, .15) !important;*/
}
input.field-error + .image-wrap {
  border-color: #e11d48 !important;
  /*box-shadow: 0 0 0 3px rgba(225, 29, 72, .15);*/
}
.cfg-submit { display: none; margin-left: auto; }

/* Review block */
.cfg-review {
  background: transparent;
  padding: 0;
}
.cfg-review-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 50px 0;
}
.cfg-review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.cfg-review-item {
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: 10px;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cfg-review-item .review-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  opacity: 0.7;
}
.cfg-review-item .review-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}
.cfg-review-placeholder {
  color: var(--cfg-muted);
  font-size: 14px;
  text-align: center;
  padding: 40px 20px;
}

/* Error state */
.cfg-error input,
.cfg-error select,
.cfg-error textarea {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .15);
}
.cfg-error .cfg-field > span::after,
.cfg-error .acf-label label::after { content: " *"; color: #e11d48; }

/* Hide legacy ACF tabs if any exist */
.acf-field-tab { display: none !important; }

/* Ensure hidden JSON field never shows even if ACF wraps it */
.acf-field[data-name="config_json"] { display: none !important; }

/* Responsive */
@media (max-width: 980px) {
  .cfg-ui {
    grid-template-columns: 1fr;
  }
  .cfg-steps-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .cfg-step-nav-item {
    flex: 0 0 auto;
    min-width: 180px;
  }
  .cfg-field-grid {
    grid-template-columns: 1fr;
  }
  .cfg-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0;
  }
  .cfg-review-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Configurator: Height slider styling --- */
.cfg-slider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.cfg-slider .value-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  min-width: 64px;
  height: 36px;
  border: 1px solid #E5E5E5;
  background: transparent;
  border-radius: 10px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1;
}
.cfg-slider .value-display .value {
  width: 36px;
}
.cfg-slider .value-display .unit {
  color: var(--color-primary);
  font-weight: 500;
}

.cfg-slider .ui-slider {
  position: relative;
  flex: 1 1 auto;
  height: 6px;
  background: #e9ecef;
  border-radius: 999px;
  border: none;
}

.cfg-slider .ui-slider .ui-slider-range {
  position: absolute;
  height: 100%;
  background: var(--cfg-accent);
  border-radius: 999px;
  border: none;
}

.cfg-slider .ui-slider .ui-slider-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cfg-accent);
  border: 4px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  cursor: pointer;
  outline: none;
}

.cfg-slider .ui-slider .ui-slider-handle:hover {
  filter: brightness(0.95);
}

.cfg-slider .ui-slider .ui-slider-handle:focus-visible {
  box-shadow: 0 0 0 3px rgba(101, 123, 66, .25);
}

.cfg-slider .cfg-slider-input {
  display: none!important;
}

/* --- Fenster: Quantity and dynamic sizes --- */

.window-qty .qty-wrap ,.door-qty .qty-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}
.window-qty .qty-wrap input[type="number"] ,.door-qty .qty-wrap input[type="number"] {
  width: 48px;
  text-align: center;
  background: transparent;
  padding: 8px 0;
}
.window-qty .qty-wrap img ,.door-qty .qty-wrap img , .window-qty .qty-wrap svg ,.door-qty .qty-wrap svg {
  width: 20px;
  padding: 5px;
  cursor: pointer;
}

.window-size-block, .door-size-block {
  width: 100%;
  margin-top: 12px;
}
.window-size-block .size-header, .door-size-block .size-header {
  font-weight: 500;
  color: var(--color-text);
  margin: 15px 0;
  font-size: 14px;
}
.window-size-list , .door-size-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.window-size-list .cfg-field , .door-size-list .cfg-field {
  width: 100%;
}
/* Gift Cards Step */
.gift-cards {
  gap: 80px !important;
}
.gift-card {
  width: 130px !important;
}
.gift-card label {
  cursor: pointer;
}
.gift-card .image-wrap {
  perspective: 1000px;
  position: relative;
  height: 130px;
  width: 130px;
  border: none;
  transform-style: preserve-3d;
  overflow: hidden;
}
.gift-card .image-wrap img, .gift-card .image-wrap svg {
  backface-visibility: hidden;
  transition: transform 0.6s ease, opacity 0.6s ease;
  position: absolute !important;
  top: 50%;
  left: 50%;
  max-height: 221px;
  width: auto;
}
.gift-card .gift-default {
  transform: translate(-50%, -50%) rotateY(0deg);
  opacity: 1;
  visibility: visible;
}
.gift-card .gift-prize {
  transform: translate(-50%, -50%) rotateY(180deg);
  opacity: 0;
  visibility: hidden;
}
.gift-card input[type="radio"]:checked ~ .image-wrap .gift-default {
  transform: translate(-50%, -50%) rotateY(-180deg);

/* Rating Screen */
.cfg-rating-screen {
  text-align: center;
  padding: 40px 20px;
  max-width: 600px;
  margin: 0 auto;
}
.cfg-rating-screen h2 {
  font-size: 40px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
}
.cfg-rating-screen p {
  font-size: 18px;
  color: var(--color-text);
  margin-bottom: 30px;
}
.star-rating {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  font-size: 48px;
}
.star {
  font-family: "star";
  cursor: pointer;
  color: #E5E5E5;
  transition: color 0.2s, transform 0.2s;
  user-select: none;
}
.star:hover {
  transform: scale(1.2);
}
.star.selected {
  color: #FFD700;
}
.rating-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin: 20px 0 30px 0;
}
.rating-submit {
  padding: 20px 50px;
  background: var(--cfg-accent);
  color: var(--cfg-accent-contrast);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.rating-submit:hover {
  background: var(--color-primary-hover);
}
.cfg-success {
  text-align: center;
  padding: 60px 20px;
}
.cfg-success h2 {
  font-size: 40px;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.cfg-success p {
  font-size: 18px;
  color: var(--color-text);
  margin: 15px 0;
}
  opacity: 0;
  visibility: hidden;
}
.gift-card input[type="radio"]:checked ~ .image-wrap .gift-prize {
  transform: translate(-50%, -50%) rotateY(0deg);
  opacity: 1;
  visibility: visible;
}
.gift-card input[type="radio"]:checked ~ .image-wrap {
  border-color: var(--color-primary);
  border-width: 2px;
}
.gift-card input[type="radio"]:checked ~ .text {
  color: var(--color-primary);
  opacity: 1;
}
.gift-card.other-selected label {
  cursor: not-allowed;
  pointer-events: none;
}
.gift-card.other-selected input[type="radio"] {
  pointer-events: none;
}
@media (max-width: 980px) {
  .gift-card {
    width: calc(50% - 15px) !important;
  }
}
@media (max-width: 640px) {
  .gift-card {
    width: 100% !important;
  }
}

