/* Quote page. Tokens, nav, hero, footer and .btn live in common.css. */

.quote {
  --field-bg: #EEF6F8; /* background of every input, dropdown and text area */
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(25px, 6vw, 54px) 20px calc(32px + env(safe-area-inset-bottom));
  scroll-margin-top: calc(var(--nav-height, 72px) + 8px);
}

.quote :is(button, a):focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 3px;
}

/* ── Notice: shared .notice-info banner (common.css), centred at every width ── */

.quote .notice {
  text-align: center;
}

/* The steps hide on the confirmation screen; the notice goes with them. */
.quote:has(.progress[hidden]) .notice {
  display: none;
}

/* ── Progress: one hairline that fills as you go ── */

.progress {
  margin-bottom: clamp(32px, 6vw, 56px);
}

.progress ol {
  display: flex;
  list-style: none;
}

.progress li {
  flex: 1;
  min-width: 0;
}

.progress button {
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 44px;
  padding: 0 0 12px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: clamp(0.68rem, 2.4vw, 0.8rem);
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.progress button:disabled {
  color: var(--text-faint);
  cursor: default;
}

.progress button[aria-current="step"] {
  color: var(--primary);
  font-weight: 700;
}

.progress-track {
  height: 2px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lavender-deep), var(--primary));
  transition: width 0.45s ease;
}

/* ── Panels ── */

.panel {
  display: none;
}

.panel.is-active {
  display: block;
  animation: panel-in 0.35s ease;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
}

.panel > h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lead {
  max-width: 52ch;
  margin-bottom: 36px;
  color: var(--text-muted);
}

.panel-foot {
  margin-top: 16px;
}

/* Quiet text action: Edit, Remove, Add another, Browse */
.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s;
}

.link-btn:hover {
  color: var(--lavender-deep);
}

/* ── Fields: underline only, no boxes ── */

.field {
  display: block;
  min-width: 0;
  margin-bottom: 24px;
  border: 0;
}

.label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.req {
  color: var(--lavender-deep);
}

.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  column-gap: 28px;
}

.quote :is(input, select, textarea) {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background-color: var(--field-bg);
  font-size: 1rem;
}

.quote :is(input, select, textarea):focus {
  border-color: var(--lavender-deep);
  box-shadow: 0 1px 0 var(--lavender-deep);
  background-color: var(--field-bg);
}

.quote ::placeholder {
  color: #9aa9ae;
  opacity: 0.9;
}


.quote :is(input, select, textarea):-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--field-bg) inset;
  -webkit-text-fill-color: var(--text);
}

.quote textarea {
  min-height: 0;
}

.quote select {
  padding-right: 38px;
  appearance: none;
  background: var(--field-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238E8E8E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px;
  cursor: pointer;
}

/* The open dropdown list: plain white, not the field colour */
.quote select option {
  background-color: #fff;
  color: var(--text);
}

.quote .field-error {
  border-color: var(--error);
  box-shadow: 0 1px 0 var(--error);
}

.qty {
  display: flex;
  gap: 16px;
}

.qty input {
  flex: 1 1 auto;
  min-width: 0;
}

.qty select {
  flex: 0 0 120px;
  width: 120px;
}

/* Certifications: a plain list, one checkbox beside each name */
.choices {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 4px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.choice input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  background-color: transparent;
  cursor: pointer;
}

.choice input:focus {
  box-shadow: none;
  background-color: transparent;
}

.choice input:focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 3px;
}

/* ── Step 1: selected products ── */

.count {
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.empty {
  max-width: 52ch;
  color: var(--text-muted);
}

.picks {
  list-style: none;
  border-top: 1px solid var(--border-soft);
}

.pick {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.pick .product-media {
  flex: 0 0 52px;
  width: 52px;
  border-radius: 10px;
}

.pick-body {
  flex: 1;
  min-width: 0;
}

.pick-category {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pick-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--lavender-pale);
  color: var(--error);
}

/* ── Step 2: custom products ── */

.item {
  padding: 28px 0 4px;
  border-top: 1px solid var(--border-soft);
}

.item:first-child {
  padding-top: 0;
  border-top: 0;
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--lavender-deep);
}

/* ── Step 5: review ── */

.review {
  padding: 20px 0 12px;
  border-top: 1px solid var(--border-soft);
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Count pill beside a review heading. Same look as the nav "My Basket" badge
   (.nav-link-badge in common.css). It has its own class because site.js
   overwrites the text of every .nav-link-badge with the basket count. */
.review-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--lavender-deep);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}

.review-count[hidden] {
  display: none;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(96px, 34%) 1fr;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.92rem;
}

.review-label {
  color: var(--text-muted);
}

.review-value {
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

/* One block per custom product, hairline between them */
.review-item + .review-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.review-empty {
  padding-bottom: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ── Status + actions ── */

.status {
  min-height: 1.4em;
  margin-top: 20px;
  font-size: 0.92rem;
  font-weight: 600;
}

.status.error {
  color: var(--error);
}

.status.sending {
  color: var(--text-muted);
}

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

.actions .btn {
  min-height: 52px;
  margin-left: auto;
  padding: 0 32px;
  border-radius: 999px;
}

.back {
  min-height: 52px;
  padding: 0 4px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.back:hover {
  color: var(--text);
}

.btn.is-sending {
  cursor: progress;
  opacity: 0.85;
}

.btn.is-sending::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Confirmation ── */

.confirm {
  padding: 24px 0;
  text-align: center;
}

.confirm .lead {
  margin-inline: auto;
}

.confirm-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-mark circle {
  stroke: var(--lavender);
}

.confirm-mark path {
  stroke: var(--primary);
  stroke-dasharray: 40;
  animation: draw 0.6s 0.15s ease backwards;
}

@keyframes draw {
  from { stroke-dashoffset: 40; }
}

.confirm .btn {
  border-radius: 999px;
}

@media (max-width: 480px) {
  .actions .btn {
    min-height: 46px;
    padding: 0 22px;
    font-size: 0.9rem;
  }
}
