.alke-configurator {
  margin: 40px 0;
}

.alke-cfg-head.containerized {
  margin-bottom: 16px;
  text-align: center;
}

.alke-cfg-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #111;
  padding-bottom: 8px;
}

.alke-cfg-subtitle {
  margin: 0 0 18px;
  color: #374151;
  font-size: 1.05rem;
  font-weight: bold;
}

.alke-cfg-shell.containerized {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: #f3f4f6;
  border-radius: 5px;
  padding: 16px 20px;
  min-height: 340px;
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .alke-cfg-shell.containerized {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.alke-cfg-visual {
  background: transparent;
  border-radius: 5px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.alke-cfg-visual img {
  max-width: 95%;
  height: auto;
  display: block;
}

.alke-cfg-panel {
  background: transparent;
  color: #111827;
  border: 0;
  border-radius: 5px;
  padding: 16px;
}

.alke-cfg-stepper {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.alke-cfg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
}

.alke-cfg-step__dot {
  width: 36px;
  height: 36px;
  border-radius: 100px;
  border: 2px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.alke-cfg-step.is-active .alke-cfg-step__dot {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

/* Completed steps should also be black */
.alke-cfg-step.is-completed .alke-cfg-step__dot {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.alke-cfg-step__label {
  font-size: 0.8rem;
  color: #4b5563;
  text-align: center;
}

.alke-cfg-progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.alke-cfg-progress__bar {
  height: 100%;
  width: 0%;
  background: #111827;
  border-radius: 10px;
  transition: width 0.25s ease;
}

.alke-cfg-body {
  background: transparent;
}

.alke-cfg-loading {
  padding: 10px 0;
}

.alke-cfg-step-title {
  margin: 50px 0 10px 0;
  color: #111827;
  font-weight: bold;
  font-size: 30px;
}

.alke-cfg-hint {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 0.85rem;
}

.alke-cfg-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .alke-cfg-options {
    grid-template-columns: 1fr 1fr;
  }
}

.alke-cfg-opt {
  display: block;
  padding: 12px 14px;
}
/* Custom bullets for options */
.alke-cfg-opt input[type="checkbox"],
.alke-cfg-opt input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 2px solid #9ca3af;
  margin: 0 8px 0 0;
  vertical-align: middle;
}
.alke-cfg-opt input[type="checkbox"]:checked,
.alke-cfg-opt input[type="radio"]:checked {
  border-color: #dc2626;
  background: #dc2626;
}

.alke-cfg-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.alke-cfg-btn {
  background: #111827;
  color: #fff;
  border: 1px solid #111827;
  padding: 5px 12px;
  border-radius: 5px;
}

.alke-cfg-btn[disabled] {
  opacity: 0.6;
}

.alke-cfg-btn.is-next {
  background: #dc2626;
  border-color: #dc2626;
}

.alke-cfg-btn.is-restart {
  background: transparent;
  color: #374151;
  border-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alke-cfg-results {
  grid-column: 1 / -1;
  margin-top: 20px;
}

.alke-cfg-results-title {
  color: #111827;
  font-size: 1.4rem;
}

/* Reuse product-cards visual spacing inside configurator */
.alke-cfg-results .alke-pc-grid {
  gap: 16px;
}

.alke-cfg-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: none;
  padding-bottom: 8px;
  padding-left: 0;
  padding-right: 0;
}

/* Center alignment in results state */
.alke-configurator.is-results .alke-cfg-head,
.alke-configurator.is-results .alke-cfg-results-title,
.alke-configurator.is-results .alke-cfg-answers,
.alke-configurator.is-results .alke-cfg-actions {
  text-align: center;
  justify-content: center;
}
.alke-configurator.is-results .alke-cfg-actions {
  display: flex;
}
.alke-configurator.is-results .alke-cfg-btn.is-next {
  display: none;
}
.alke-configurator.is-results .alke-cfg-cta-final {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 10px 18px;
  border: 1px solid #111827;
  color: #111827;
  background: #ffffff;
  text-decoration: none;
  font-weight: 700;
}
.alke-configurator.is-results .alke-cfg-grid {
  justify-content: flex-start;
}

@media (min-width: 992px) {
  /* On results, make the panel span both columns to avoid empty right space */
  .alke-configurator.is-results .alke-cfg-panel {
    grid-column: 1 / -1;
  }
}

.alke-cfg-answers {
  margin: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alke-cfg-answers__label {
  color: #6b7280;
  font-size: 0.9rem;
}
.alke-cfg-answers__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.alke-cfg-pill {
  background: #e5e7eb;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: #374151;
}
/* Pills inside body area too */
.alke-cfg-body .alke-cfg-answers {
  margin: 8px 0 12px;
}

.alke-cfg-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 5px;
  overflow: hidden;
}

.alke-cfg-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.alke-cfg-card__body {
  padding: 10px 12px;
}

.alke-cfg-card__title {
  margin: 0 0 4px;
  color: #111827;
}

.alke-cfg-card__text {
  margin: 0;
  color: #4b5563;
  font-size: 0.92rem;
}

.alke-cfg-error {
  color: #991b1b;
  background: #fee2e2;
  padding: 12px;
  border-radius: 5px;
}

.alke-link {
  color: #2563eb;
  text-decoration: none;
}

/* Debug panel */
.alke-cfg-debug {
  margin-top: 12px;
  border: 1px dashed #e5e7eb;
  border-radius: 5px;
  background: #fafafa;
}
.alke-cfg-debug > summary {
  cursor: pointer;
  padding: 8px 10px;
  color: #374151;
}
.alke-cfg-debug__log {
  margin: 0;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  background: #111827;
  color: #e5e7eb;
  font:
    12px/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
}

/* Skeleton loading ------------------------------------------------------ */
@keyframes alke-skel-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.alke-skel__title,
.alke-skel__hint,
.alke-skel__opt,
.alke-skel-line,
.alke-skel-card__media,
.alke-skel-card__line {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
  background-size: 200% 100%;
  animation: alke-skel-shimmer 1.4s ease infinite;
}

.alke-skel {
  display: block;
}

.alke-skel__title {
  height: 28px;
  width: 60%;
  border-radius: 5px;
  margin: 18px 0 10px;
}

.alke-skel__hint {
  height: 14px;
  width: 40%;
  border-radius: 5px;
  margin: 6px 0 16px;
}

.alke-skel__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .alke-skel__list {
    grid-template-columns: 1fr 1fr;
  }
}

.alke-skel__opt {
  height: 44px;
  border-radius: 5px;
}

/* Results: skeleton cards in grid */
.alke-skel-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 0 0 clamp(260px, 26vw, 320px);
}

.alke-skel-card__media {
  aspect-ratio: 16/9;
}

.alke-skel-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alke-skel-line,
.alke-skel-card__line {
  height: 14px;
  border-radius: 5px;
}

.alke-skel-line.w-100,
.alke-skel-card__line.w-100 {
  width: 100%;
}
.alke-skel-line.w-80,
.alke-skel-card__line.w-80 {
  width: 80%;
}
.alke-skel-line.w-70,
.alke-skel-card__line.w-70 {
  width: 70%;
}

@media (prefers-reduced-motion: reduce) {
  .alke-skel__title,
  .alke-skel__hint,
  .alke-skel__opt,
  .alke-skel-line,
  .alke-skel-card__media,
  .alke-skel-card__line {
    animation: none;
  }
}
