.configurator-model-card,
.configurator-version-card {
  cursor: pointer;
  border: 1px solid transparent;
}

.configurator-color-error {
  font-family: "Montserrat", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #D8232A;
  text-align: center;
}

.configurator-color-error[hidden] {
  display: none;
}

.configurator-model-card .model-img {
  transition: opacity 0.3s ease-out;
}

.configurator-model-card .model-img-back {
  opacity: 0;
}

@media (hover: hover) {
  .configurator-model-card:hover,
  .configurator-version-card:hover {
    border-color: #8A8A8A;
  }

  .configurator-model-card:hover .btn-black,
  .configurator-version-card:hover .btn-black {
    background-color: var(--gac-darkGray);
    border-color: var(--gac-darkGray);
  }

  .configurator-model-card:hover .btn svg,
  .configurator-version-card:hover .btn svg {
    transform: translateX(8px);
  }

  .configurator-model-card:hover .model-img-front {
    opacity: 0;
  }

  .configurator-model-card:hover .model-img-back {
    opacity: 1;
  }
}

[data-versions-model] {
  display: none;
}

[data-versions-model].active {
  display: block;
}

.configurator-step {
  display: none;
  opacity: 0;
}

.configurator-step.active {
  display: flex;
  animation: stepFadeIn 0.4s ease-out forwards;
}

.configurator-step.leaving {
  display: flex;
  animation: stepFadeOut 0.25s ease-out forwards;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes stepFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

.configurator-steps-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .configurator-steps-nav {
    gap: 32px;
    margin-bottom: 72px;
  }
}

.configurator-step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 768px) {
  .configurator-step-indicator {
    gap: 16px;
  }
}

.step-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid #908e8e;
  padding: 2px 7px;
  background-color: transparent;
  color: #908e8e;
  font-family: var(--gac-font-montserrat);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  transition:
    background-color 0.3s ease-out,
    color 0.3s ease-out,
    border-color 0.3s ease-out;
}

.step-label {
  font-family: var(--gac-font-montserrat);
  font-weight: 500;
  font-size: 16px;
  line-height: 155%;
  letter-spacing: -0.02em;
  color: #908e8e;
  transition: color 0.3s ease-out;
  display: none;
}

@media (min-width: 768px) {
  .step-label {
    display: block;
  }
}

.configurator-step-indicator.active .step-label {
  display: block;
  color: #000;
}

.configurator-step-indicator.active .step-circle {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.configurator-step-indicator.completed .step-circle {
  background-color: transparent;
  color: #000;
  border-color: #000;
}

.configurator-step-indicator.completed .step-label {
  color: #000;
}

.configurator-step-indicator.completed {
  cursor: pointer;
}

.step-separator {
  flex-shrink: 0;
  width: 24px;
  height: 1px;
  background-color: #908e8e;
  margin: 0 -16px;
}

[data-colors-model] {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  [data-colors-model] {
    gap: 3rem;
  }
}

[data-colors-model].active {
  display: flex;
}

.box-shadow-color-step {
  box-shadow: 0px 16px 32px 0px #2F35510F;
}

.configurator-version-card .version-card-features li {
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 16px;
}

[data-summary-model] {
  display: none;
}

[data-summary-model].active {
  display: flex;
}

[data-tab-content] {
  display: none;
}

[data-tab-content].active {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  animation: tabFadeIn 0.25s ease-out forwards;
}

@media (min-width: 768px) {
  [data-tab-content].active {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
}

@keyframes tabFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


.color-swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background-color 0.3s ease-out;
}

@media (min-width: 768px) {
  .color-swatch-item {
    gap: 8px;
    padding: 16px 28px;
  }
}

.color-swatch-item:hover {
  background-color: #F2F2F2;
}

.color-swatch-item:hover .color-swatch-name {
  text-decoration: underline;
}

.color-swatch-item.selected {
  background-color: #F2F2F2;
}

.color-swatch-box {
  position: relative;
  width: 56px;
  height: 56px;
}

@media (min-width: 768px) {
  .color-swatch-box {
    width: 72px;
    height: 72px;
  }
}

.color-swatch-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.color-swatch-overlay {
  position: absolute;
  inset: 0;
  opacity: 1;
  mix-blend-mode: multiply;
}

.color-swatch-check {
  display: none;
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background-color: #000;
  border: 1px solid #000;
  border-radius: 6px;
  background-image: url('../img/konfigurator/check.svg');
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center center;
}

.color-swatch-item.selected .color-swatch-check {
  display: block;
}

@media (min-width: 768px) {
  .color-swatch-check {
    bottom: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background-size: 16px 16px;
  }
}

.color-swatch-name {
  font-family: var(--gac-font-montserrat);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: #0e0e0e;
  max-width: 72px;
  line-height: 1.4;
}

.color-swatch-surcharge {
  font-family: var(--gac-font-montserrat);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
  color: #595757;
  line-height: 1.4;
  margin-top: -2px;
}

[data-tab-content].configurator-swatches-grouped.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  [data-tab-content].configurator-swatches-grouped.active {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
  }
}

.configurator-swatches-grouped .color-swatch-item {
  width: 128px;
  gap: 12px;
  padding: 16px 8px;
  border-radius: 8px;
}

.configurator-swatch-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.configurator-swatch-group-title {
  width: 100%;
  font-family: var(--gac-font-montserrat);
  font-weight: 500;
  font-size: 12px;
  line-height: 130%;
  letter-spacing: -0.02em;
  text-align: center;
  color: #595757;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6e6e6;
}

.configurator-swatch-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.configurator-swatch-divider {
  width: 1px;
  height: 40px;
  background: #e6e6e6;
  flex-shrink: 0;
  align-self: center;
}

@media (max-width: 767px) {
  .configurator-swatch-divider {
    width: 40px;
    height: 1px;
  }
}

.configurator-color-tabs {
  display: flex;
  justify-content: center;
  gap: 32px;
  border-bottom: 1px solid #E6E6E6;
}

.color-tab {
  font-family: var(--gac-font-montserrat);
  font-size: 1rem;
  font-weight: 500;
  line-height: 155%;
  letter-spacing: -0.02em;
  color: #908E8E;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.color-tab.active {
  color: #000;
  border-bottom-color: #000;
  font-weight: 600;
}

[data-preview-tab] {
  display: none;
}

[data-preview-tab].active {
  display: block;
}

.configurator-slider-wrap {
  margin-left: -1.5rem;
  margin-right: -1.5rem;
}

@media (min-width: 768px) {
  .configurator-slider-wrap {
    margin-left: -3rem;
    margin-right: -3rem;
  }
}

.configurator-slider {
  position: relative;
}

.configurator-slider .swiper {
  width: 100%;
  overflow: hidden;
}

.configurator-swiper .swiper-slide {
  position: relative;
  width: 80%;
  aspect-ratio: 718 / 404;
}

@media (min-width: 768px) {
  .configurator-swiper .swiper-slide {
    width: 62%;
  }
}

.configurator-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 24px;
}

.configurator-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 100px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
}

.configurator-slider-arrow img {
  width: 14px;
  height: 14px;
}

@media (min-width: 768px) {
  .configurator-slider-arrow {
    width: 48px;
    height: 48px;
  }
  .configurator-slider-arrow img {
    width: 16px;
    height: 16px;
  }
}

.configurator-slider-prev {
  left: 0;
}

.configurator-slider-next {
  right: 0;
}

@media (min-width: 768px) {
  .configurator-slider-prev {
    left: 17%;
  }
  .configurator-slider-next {
    right: 17%;
  }
}

.configurator-slider-arrow:hover {
  opacity: 0.85;
}

.configurator-slider-arrow.swiper-button-disabled {
  display: none;
}

.configurator-slider-arrow img {
  display: block;
}

.configurator-slider-prev img {
  transform: scaleX(-1);
}

.configurator-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.configurator-slider-dot {
  width: 40px;
  height: 3px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: #d0d0d0;
  cursor: pointer;
  transition: background-color 0.3s ease-out;
}

.configurator-slider-dot.active {
  background: #000;
}

.summary-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 12px;
  border: 1px solid #E6E6E6;
  border-radius: 16px;
}

@media (min-width: 768px) {
  .summary-chip {
    gap: 16px;
    padding: 16px 16px 20px;
    border-radius: 24px;
  }
}

.summary-chip-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.summary-chip-header span {
  font-family: var(--gac-font-montserrat);
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 160%;
  letter-spacing: -0.02em;
  color: #000;
}

@media (min-width: 768px) {
  .summary-chip-header span {
    font-size: 1rem;
  }
}

.summary-chip-edit {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background-color 0.2s ease-out;
}

@media (min-width: 768px) {
  .summary-chip-edit {
    bottom: auto;
    top: 8px;
    right: 8px;
    padding: 8px;
  }
}

.summary-chip-edit:hover {
  background-color: #F2F2F2;
}

.summary-chip-edit img {
  width: 12px;
  height: 12px;
}

@media (min-width: 768px) {
  .summary-chip-edit img {
    width: 16px;
    height: 16px;
  }
}

.summary-chip-visual {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

[data-summary-chip-visual="version"] {
  width: auto;
  height: 48px;
}

@media (min-width: 768px) {
  .summary-chip-visual {
    width: 72px;
    height: 72px;
  }
  [data-summary-chip-visual="version"] {
    width: auto;
    height: 72px;
  }
}

.summary-chip-label {
  font-family: var(--gac-font-montserrat);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 130%;
  letter-spacing: -0.02em;
  text-align: center;
  text-transform: uppercase;
  color: #595757;
  width: 100%;
}

#configurator-popup .wpcf7-form .wpcf7-submit.btn-form {
  margin-top: 1rem;
}

#configurator-popup .wpcf7-response-output {
  margin: 0.5rem 1.5rem 1rem;
}

.configurator-popup-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.configurator-popup-loader.active {
  opacity: 1;
  pointer-events: all;
}

.configurator-loader-spinner {
  display: inline-block;
  background-color: #23282d;
  opacity: 0.75;
  width: 24px;
  height: 24px;
  border-radius: 100%;
  position: relative;
}

.configurator-loader-spinner::before {
  content: '';
  position: absolute;
  background-color: #fbfbfc;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  transform-origin: 8px 8px;
  animation: configuratorSpin 1000ms linear infinite;
}

@keyframes configuratorSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  #configurator-popup .wpcf7-form .wpcf7-submit.btn-form {
    margin-top: 1.5rem;
  }
}

#configurator-popup .wpcf7-form .wpcf7-spinner {
  position: relative;
  display: none;
  margin: 0.75rem auto 0;
}

#configurator-popup .wpcf7-form.submitting .wpcf7-spinner {
  display: block;
}

#configurator-popup .wpcf7-form .wpcf7-spinner::before {
  animation-name: spin;
  animation-duration: 1000ms;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
