/* ── Woodhouse Quote Form ─────────────────────────────────────────────────
   Colours driven by CSS variables set inline by PHP (from Settings page).
   Defaults here are the fallback if PHP output is missing.
─────────────────────────────────────────────────────────────────────────── */

.whq-root {
  --whq-color:        #2e6b3e;
  --whq-color-dark:   #1d4a2b;
  --whq-color-light:  #f1f9f3;
  --whq-color-shadow: rgba(46,107,62,0.14);
  --whq-color-focus:  rgba(46,107,62,0.12);

  max-width: 860px;
  margin: 0 auto;
  padding: 12px 0 40px;
  font-family: inherit;
  color: #2d2d2d;
  box-sizing: border-box;
}

.whq-root *, .whq-root *::before, .whq-root *::after {
  box-sizing: inherit;
}

.whq-intro {
  font-size: 15px;
  line-height: 1.65;
  color: #555;
  margin: 0 0 28px;
}

/* ── Progress bar ─────────────────────────────────────────────────────── */

.whq-progress {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 36px;
  position: relative;
}

.whq-progress::before {
  content: '';
  position: absolute;
  top: 19px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 2px;
  background: #e0e0e0;
  z-index: 0;
}

.whq-step-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.whq-step-dot span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d0d0d0;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.whq-step-dot label {
  font-size: 11px;
  margin-top: 6px;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: default;
  transition: color 0.25s;
}

.whq-step-dot.active span  { background: var(--whq-color); border-color: var(--whq-color); color: #fff; }
.whq-step-dot.active label { color: var(--whq-color); }

.whq-step-dot.complete span  { background: var(--whq-color); border-color: var(--whq-color); color: #fff; }
.whq-step-dot.complete label { color: var(--whq-color); }

.whq-step-dot.complete { cursor: pointer; }
.whq-step-dot.complete:hover span { background: var(--whq-color-dark); border-color: var(--whq-color-dark); }

/* ── Panels ───────────────────────────────────────────────────────────── */

.whq-panel        { display: none; }
.whq-panel.active { display: block; }

.whq-heading {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  margin: 0 0 20px;
  color: #1a1a1a;
  line-height: 1.25;
}

.whq-optional { font-size: 14px; font-weight: 400; color: #888; }
.whq-hint     { margin: -10px 0 18px; font-size: 14px; color: #777; line-height: 1.5; }

/* ── Selection cards ──────────────────────────────────────────────────── */

.whq-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.whq-card {
  position: relative;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 22px 14px 18px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  user-select: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
}

.whq-card:hover {
  border-color: var(--whq-color);
  box-shadow: 0 4px 18px var(--whq-color-shadow);
  transform: translateY(-2px);
}

.whq-card.selected {
  border-color: var(--whq-color);
  background: var(--whq-color-light);
}

.whq-card-icon {
  width: 56px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--whq-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.whq-card-icon svg { width: 100%; height: 100%; }
.whq-card-icon img { width: 100%; height: 100%; object-fit: contain; }

.whq-card-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: #222;
}

.whq-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--whq-color);
  display: none;
  align-items: center;
  justify-content: center;
}

.whq-card.selected .whq-card-check { display: flex; }
.whq-card-check svg { width: 13px; height: 13px; stroke: #fff; }

/* ── Product grid ─────────────────────────────────────────────────────── */

.whq-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.whq-prod-card {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  position: relative;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
}

.whq-prod-card:hover {
  border-color: var(--whq-color);
  box-shadow: 0 4px 14px var(--whq-color-shadow);
  transform: translateY(-2px);
}

.whq-prod-card.selected {
  border-color: var(--whq-color);
  background: var(--whq-color-light);
}

.whq-prod-img {
  aspect-ratio: 4 / 3;
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whq-prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.whq-prod-no-img { color: #c8c8c8; }
.whq-prod-no-img svg { width: 44px; height: 44px; }

.whq-prod-name {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  color: #222;
}

.whq-prod-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--whq-color);
  display: none;
  align-items: center;
  justify-content: center;
}

.whq-prod-card.selected .whq-prod-check { display: flex; }
.whq-prod-check svg { width: 14px; height: 14px; stroke: #fff; }

/* ── Summary strip ────────────────────────────────────────────────────── */

.whq-summary {
  background: #f4f8f5;
  border-left: 4px solid var(--whq-color);
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  margin-bottom: 22px;
}

.whq-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
}

.whq-summary-list li { font-size: 14px; color: #444; }

/* ── Contact form ─────────────────────────────────────────────────────── */

.whq-form-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 22px;
}

.whq-form-fields label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #444;
  margin-top: 14px;
}

.whq-form-fields label:first-child { margin-top: 0; }

.whq-form-fields input,
.whq-form-fields textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 13px;
  border: 1.5px solid #d5d5d5;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
}

.whq-form-fields input:focus,
.whq-form-fields textarea:focus {
  outline: none;
  border-color: var(--whq-color);
  box-shadow: 0 0 0 3px var(--whq-color-focus);
}

.whq-form-fields textarea { resize: vertical; min-height: 90px; }

.whq-req { color: #c0392b; }

/* ── Navigation ───────────────────────────────────────────────────────── */

.whq-nav {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 4px;
}

.whq-btn {
  padding: 11px 26px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  transition: background 0.18s, border-color 0.18s, opacity 0.18s;
}

.whq-btn-next,
.whq-btn-submit {
  background: var(--whq-color);
  color: #fff;
  border-color: var(--whq-color);
}

.whq-btn-next:hover:not(:disabled),
.whq-btn-submit:hover:not(:disabled) {
  background: var(--whq-color-dark);
  border-color: var(--whq-color-dark);
}

.whq-btn-next:disabled {
  background: #b0b0b0;
  border-color: #b0b0b0;
  cursor: not-allowed;
  opacity: 0.7;
}

.whq-btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.whq-btn-back {
  background: transparent;
  color: #555;
  border-color: #d0d0d0;
}

.whq-btn-back:hover { border-color: #888; color: #222; }

/* ── Success ──────────────────────────────────────────────────────────── */

.whq-success { text-align: center; padding: 48px 24px; }

.whq-success svg {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 22px;
  stroke: var(--whq-color);
  stroke-width: 2;
  fill: none;
}

.whq-success svg circle { fill: var(--whq-color-light); stroke: var(--whq-color); }
.whq-success svg path   { stroke-linecap: round; stroke-linejoin: round; }

.whq-success h2 { font-size: 26px; font-weight: 700; color: var(--whq-color); margin: 0 0 12px; }
.whq-success p  { font-size: 16px; color: #555; margin: 0; line-height: 1.6; }

/* ── Utility ──────────────────────────────────────────────────────────── */

.whq-loading    { padding: 20px 0; color: #888; font-size: 14px; }
.whq-error      { color: #c0392b; font-size: 14px; margin: 8px 0 0; min-height: 18px; }
.whq-no-results { font-size: 14px; color: #888; font-style: italic; padding: 12px 0 20px; margin: 0; }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .whq-cards        { grid-template-columns: 1fr 1fr; }
  .whq-product-grid { grid-template-columns: 1fr 1fr; }
  .whq-btn          { padding: 10px 18px; font-size: 14px; }
  .whq-progress::before { left: 10%; right: 10%; }
  .whq-step-dot label   { font-size: 10px; }
}

@media (max-width: 380px) {
  .whq-cards        { grid-template-columns: 1fr; }
  .whq-product-grid { grid-template-columns: 1fr; }
  .whq-nav          { flex-direction: column-reverse; }
  .whq-btn          { width: 100%; text-align: center; }
}
