/* ==========================================================================
   Tabletops Furniture – Table Base Recommender
   Figma: Tabletops-Furniture › Recommender (node 64:127)
   ========================================================================== */

.recommender,
.rec-modal-layer {
  --rec-green: #016f41;
  --rec-green-dark: #16654a;
  --rec-green-tint: #f2f8f5;
  --rec-green-line: rgba(1, 111, 65, 0.1);
  --rec-panel: #f8f8f8;
  --rec-border: #ccc;
  --rec-muted: #999;
  --rec-divider: #eee;
  --rec-card-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.recommender {
  font-family: "Barlow Semi Condensed", Arial, sans-serif;
  color: #000;
  max-width: 1280px;
  margin: 0 auto;
}

.recommender *,
.recommender *::before,
.recommender *::after { box-sizing: border-box; }

:where(.recommender, .rec-modal-layer) button { font: inherit; color: inherit; }

/* Screens are shown/hidden by recommender.js via the hidden attribute */
.recommender [hidden] { display: none !important; }

/* ---------- Panel ---------- */

.rec-panel {
  background: var(--rec-panel);
  border-radius: 10px;
  min-height: 550px;
  padding: 47px 20px 73px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rec-panel--start { padding-top: 40px; }
.rec-panel--results { padding-bottom: 28px; }

.rec-title {
  margin: 0;
  font-weight: 300;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
}

.rec-title--welcome { font-size: 36px; }

.rec-title--results {
  font-weight: 500;
  color: var(--rec-green);
}

.rec-body {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 73px;
  margin-bottom: 40px;
}

.rec-body--sizes { margin-top: 48px; }

/* ---------- Start ---------- */

.rec-intro {
  max-width: 675px;
  margin: 36px 0 0;
  font-size: 16px;
  text-align: center;
}

.rec-intro p { margin: 0 0 19px; }
.rec-intro p:last-child { margin-bottom: 0; }
.rec-intro__lead {
  font-size: 18px;
  font-weight: 500;
}
.rec-start-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 19px;
  margin-bottom: 40px;
}

.rec-project-name {
  width: 100%;
  max-width: 371px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--rec-border);
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #000;
}

.rec-project-name::placeholder { color: var(--rec-muted); }

.rec-project-name:focus {
  outline: none;
  border-color: var(--rec-green);
  box-shadow: 0 0 0 2px var(--rec-green-line);
}

.rec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rec-green);
  border-radius: 5px;
  background: var(--rec-green);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.rec-btn:hover { background: var(--rec-green-dark); }

.rec-btn--start {
  margin-top: 18px;
  padding: 14px 28px;
  background: var(--rec-green-dark);
  border-color: var(--rec-green-dark);
  font-size: 15px;
}

.rec-btn--start:hover { background: var(--rec-green); }

/* ---------- Option cards ---------- */

.rec-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}
.rec-options--compact .rec-card {
  width: 150px;
  padding-left: 8px;
  padding-right: 8px;
}
.rec-card {
  width: 192px;
  min-height: 135px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 5px;
  box-shadow: var(--rec-card-shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rec-card:hover,
.rec-card:focus-visible {
  outline: none;
  border-color: var(--rec-green);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.rec-card.is-selected { border-color: var(--rec-green); }

.rec-card--short { min-height: 100px; }

.rec-card__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.rec-card__icon img { display: block; }

.rec-card__label {
  margin-top: 11px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.rec-card--light .rec-card__label { font-weight: 300; }

.rec-card__desc {
  margin-top: 3px;
  max-width: 134px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.2;
}

/* ---------- Top size pills ---------- */

.rec-sizes {
  display: grid;
  grid-template-columns: repeat(6, 126px);
  gap: 17px 14px;
  justify-content: center;
}

.rec-size {
  height: 41px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 5px;
  box-shadow: var(--rec-card-shadow);
  color: var(--rec-green);
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rec-size:hover,
.rec-size:focus-visible,
.rec-size.is-selected {
  outline: none;
  border-color: var(--rec-green);
}

/* ---------- Stepper ---------- */

.rec-stepper {
  margin-top: auto;
  max-width: 100%;
  border-radius: 20px;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.15));
}

.rec-panel--start .rec-stepper { filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.1)); }

.rec-stepper__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 20px;
  overflow: hidden;
}

.rec-step {
  height: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--rec-divider);
  color: var(--rec-muted);
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;
  cursor: default;
}

.rec-stepper__list > li:first-child .rec-step { border-radius: 20px 0 0 20px; }
.rec-stepper__list > li:last-child .rec-step { border-radius: 0 20px 20px 0; }

.rec-step.is-done {
  background: var(--rec-green-tint);
  border-right-color: var(--rec-green-line);
  color: var(--rec-green);
  cursor: pointer;
}

.rec-step.is-done:hover { text-decoration: underline; }

.rec-step.is-active {
  background: var(--rec-green);
  border-right-color: transparent;
  color: #fff;
}

/* ---------- Mobile stepper (shown at ≤720px) ---------- */

.rec-mstep {
  display: none;
  margin-top: auto;
  width: 100%;
  max-width: 320px;
}

.rec-mstep__bar {
  display: flex;
  height: 40px;
}

.rec-mstep__prev,
.rec-mstep__next {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;
}

.rec-mstep__prev {
  border: 0;
  border-radius: 20px 0 0 20px;
  background: var(--rec-green-tint);
  color: var(--rec-green);
  cursor: pointer;
}

.rec-mstep__prev.is-start {
  background: var(--rec-divider);
  color: var(--rec-muted);
  font-weight: 500;
  cursor: default;
}

.rec-mstep__next {
  border: 1px solid var(--rec-divider);
  border-radius: 0 20px 20px 0;
  background: #fff;
  color: var(--rec-muted);
}

.rec-mstep strong { font-weight: 500; }

.rec-mstep__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}

.rec-mstep__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9d9d9;
}

.rec-mstep__dot.is-active { background: var(--rec-green); }

@media (max-width: 720px) {
  .rec-stepper { display: none; }
  .rec-mstep { display: block; }
}

/* ---------- Results ---------- */

.rec-carousel {
  position: relative;
  width: 100%;
  max-width: 1118px;
  margin-top: 26px;
  padding: 0 18px;
}

.rec-carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px 1px 4px;
}

.rec-carousel__track::-webkit-scrollbar { display: none; }

/* Centre products when they all fit inside the carousel */
.rec-carousel__track > :first-child {
  margin-left: auto;
}

.rec-carousel__track > :last-child {
  margin-right: auto;
}
.rec-product {
  flex: 0 0 200px;
  height: 285px;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  scroll-snap-align: start;
}

.rec-product__img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  display: block;
}

.rec-product__name {
  height: 57px;
  width: 200px;
  margin: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 300;
  line-height: 22px;
  text-transform: uppercase;
  text-align: center;
}

.rec-product__add {
  width: 98px;
  height: 25px;
  margin-top: 5px;
  background: #f2f2f2;
  border: 0;
  border-right: 1px solid var(--rec-border);
  border-bottom: 1px solid var(--rec-border);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 300;
  text-transform: uppercase;
  cursor: pointer;
}

.rec-product__add:hover { background: #e8e8e8; }

.rec-product__add.is-added {
  background: var(--rec-green);
  border-color: var(--rec-green);
  color: #fff;
}

.rec-carousel__nav {
  position: absolute;
  top: 130px;
  width: 35px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 0;
  border-radius: 5px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 1;
}

.rec-carousel__nav:disabled { opacity: 0.4; cursor: default; }
.rec-carousel__nav--prev { left: 0; }
.rec-carousel__nav--prev img { transform: scaleX(-1); }
.rec-carousel__nav--next { right: 0; }
.rec-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 100%;
  max-width: 1079px;
  margin-top: 26px;
}

.rec-action {
  min-width: 0;
  min-height: 75px;
  padding: 12px 21px 12px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--rec-border);
  border-radius: 5px;
}

.rec-action--enquiry { flex: 542 1 0; }
.rec-action--restart { flex: 512 1 0; }

.rec-action__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.rec-action__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.rec-action__text {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 300;
}

.rec-action__btn {
  flex: 0 0 88px;
  height: 42px;
}

.rec-restart__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.rec-restart__row .rec-action__text { margin: 0; }

.rec-restart__row .rec-btn {
  flex: 0 0 88px;
  height: 42px;
}

.rec-title:focus { outline: none; }

/* ---------- Option entrance animation ----------
   Each option fades in and drops 10px down into place, staggered by its
   index (--i, set inline in the HTML) each time a question screen is shown. */

@keyframes rec-enter {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.rec-card,
.rec-size {
  animation: rec-enter 0.4s ease-out both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.rec-size { animation-delay: calc(var(--i, 0) * 30ms); }

@media (prefers-reduced-motion: reduce) {
  .rec-card,
  .rec-size { animation: none; }
}

/* ---------- Add to Enquiry modal ----------
   Lives on <body>; centred over a 25% black backdrop. */

.rec-modal-open { overflow: hidden; }

.rec-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0);
  font-family: "Barlow Semi Condensed", Arial, sans-serif;
  color: #000;
  transition: background-color 0.25s ease-out;
}

.rec-modal-layer *,
.rec-modal-layer *::before,
.rec-modal-layer *::after { box-sizing: border-box; }

.rec-modal-layer.is-open { background: rgba(0, 0, 0, 0.25); }

.rec-modal {
  width: 320px;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 21px 40px 49px 41px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.rec-modal-layer.is-open .rec-modal {
  opacity: 1;
  transform: none;
}

.rec-modal__img {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  object-fit: cover;
}

.rec-modal__name {
  min-height: 57px;
  margin: 0;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-transform: uppercase;
}

.rec-modal__form {
  display: flex;
  flex-direction: column;
}

.rec-modal__label {
  margin-top: 15px;
  font-size: 14px;
}

.rec-modal__qty {
  width: 100%;
  height: 30px;
  margin-top: 6px;
  padding: 0 10px;
  border: 1px solid var(--rec-border);
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #000;
}

.rec-modal__qty:focus {
  outline: none;
  border-color: var(--rec-green);
  box-shadow: 0 0 0 2px var(--rec-green-line);
}

.rec-modal__submit {
  width: 100%;
  height: 42px;
  margin-top: 21px;
}

@media (prefers-reduced-motion: reduce) {
  .rec-modal-layer,
  .rec-modal { transition: none; }
}

/* ---------- Small screens ---------- */

@media (max-width: 1100px) {
  .rec-sizes { grid-template-columns: repeat(auto-fill, 126px); max-width: 100%; }
}

@media (max-width: 640px) {
  .rec-panel { padding: 32px 16px 32px; }
  .rec-body { margin-top: 32px; }
  .rec-title--welcome { font-size: 30px; }
  .rec-card { width: calc(50% - 11px); min-width: 140px; }
  .rec-action { flex-basis: 100%; }
}
.rec-modal .error {
  display: block;
  margin-top: 8px;
  color: rgb(211, 24, 24);
  font-size: 11px;
  font-family: "DIN Next W01 Medium", Helvetica, "Helvetica Neue", Arial, sans-serif;
}

.rec-modal .error[hidden] {
  display: none;
}
