/* ===================== QUOTE PAGE — PHONES ===================== */
/* The two-step card flow, used under 768px only. Desktop keeps the original form in quote.css. */
@media (min-width: 769px) { .mq-section { display: none; } }
@media (max-width: 768px) { .quote-section { display: none; } }

/* ---------- Section + card ---------- */
.mq-section {
  position: relative;
  padding: 7.5rem 2rem 5rem;
  background:
    radial-gradient(120% 55% at 80% 0%, rgba(196,87,42,0.16), transparent 60%),
    var(--ink);
}

.qcard {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  border-radius: 32px;
  background: rgba(34, 30, 27, 0.74);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(245,240,232,0.16);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.qprog { display: flex; gap: 6px; margin-bottom: 18px; }
.qprog i { flex: 1; height: 3px; border-radius: 2px; background: rgba(245,240,232,0.16); transition: background 0.3s; }
.qprog i.on { background: var(--accent-light); }

.mq-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.qstep { display: none; flex-direction: column; min-height: 0; }
.qstep.active { display: flex; animation: qstep-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes qstep-in {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}
.qstep.is-back { animation-name: qstep-back; }
@keyframes qstep-back {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}

.qstep-label {
  margin: 0 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent-light);
}

.qq {
  margin: 0 0 14px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.qq em { font-style: italic; font-weight: 400; color: var(--accent-light); }
.qq-center { text-align: center; }

/* Service rows */
.qrows { display: flex; flex-direction: column; gap: 7px; }

.qrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(245,240,232,0.12);
  background: rgba(245,240,232,0.03);
  color: var(--cream);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.qrow input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.qrow-icon { flex: none; display: flex; color: rgba(245,240,232,0.8); }
.qrow-name { flex: 1; font-size: 1rem; font-weight: 500; letter-spacing: 0.01em; }
.qrow-tick {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(245,240,232,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.qrow-tick svg { opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.2s; }
.qrow:has(input:checked) { border-color: var(--accent-light); background: rgba(196,87,42,0.14); }
.qrow:has(input:checked) .qrow-icon { color: var(--accent-light); }
.qrow:has(input:checked) .qrow-tick { background: var(--accent); border-color: var(--accent); }
.qrow:has(input:checked) .qrow-tick svg { opacity: 1; transform: none; }
.qrow:has(input:focus-visible) { outline: 2px solid var(--accent-light); outline-offset: 2px; }
@media (hover: hover) { .qrow:hover { border-color: rgba(245,240,232,0.3); } }

/* Step 2 */
.qback {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 6px 0;
  font: inherit;
  font-size: 0.9rem;
  color: rgba(245,240,232,0.7);
  background: none;
  border: 0;
  cursor: pointer;
}

.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.qchips:empty { display: none; }
.qchip {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212,118,79,0.5);
  color: var(--accent-light);
}

.qfield { margin-bottom: 12px; }
.qfield label, .qfield-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.6);
}
.qfield-label em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: 0.8; }
.qfield textarea, .qfield input[type="tel"] {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  color: var(--cream);
  background: rgba(245,240,232,0.05);
  border: 1px solid rgba(245,240,232,0.14);
  border-radius: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.qfield textarea { min-height: 112px; resize: none; line-height: 1.45; }
.qfield input[type="tel"] { height: 52px; }
.qfield textarea:focus, .qfield input:focus { outline: none; border-color: var(--accent-light); }
.qfield textarea.is-error, .qfield input.is-error, .qcc.is-error { border-color: #e2654a; }
.qfield textarea::placeholder, .qfield input::placeholder { color: rgba(245,240,232,0.35); }

/* files */
.qfiles-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--cream);
  background: rgba(245,240,232,0.05);
  border: 1px dashed rgba(245,240,232,0.3);
  border-radius: 12px;
  cursor: pointer;
}
.qfile-list { display: flex; flex-wrap: wrap; gap: 6px; }
.qfile-list:not(:empty) { margin-top: 8px; }
.qfile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 6px 6px 10px;
  font-size: 0.8rem;
  border-radius: 999px;
  background: rgba(245,240,232,0.08);
  color: var(--cream);
}
.qfile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.qfile button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(245,240,232,0.14);
  color: var(--cream);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

/* phone + country code */
.qphone { display: flex; gap: 8px; }
.qcc {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 10px 0 14px;
  border-radius: 14px;
  background: rgba(245,240,232,0.05);
  border: 1px solid rgba(245,240,232,0.14);
  color: var(--cream);
  font-size: 16px;
}
.qcc::after { /* caret */
  content: '';
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 1.5px solid rgba(245,240,232,0.6);
  border-bottom: 1.5px solid rgba(245,240,232,0.6);
  transform: translateY(-2px) rotate(45deg);
}
.qcc select { /* the native picker, invisible on top of the label */
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}
.qcc:has(select:focus-visible) { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.qphone input { flex: 1; min-width: 0; }

.qerror {
  display: none;
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: #e2654a;
}
.qerror.show { display: block; }

/* done */
.qdone-icon {
  flex: none;
  width: 64px;
  height: 64px;
  margin: 6px auto 14px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qdone-sub { margin: -6px 0 14px; text-align: center; font-size: 0.85rem; line-height: 1.45; color: rgba(245,240,232,0.6); }
.qpreview {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(245,240,232,0.05);
  border: 1px solid rgba(245,240,232,0.12);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(245,240,232,0.85);
  white-space: pre-wrap;
  word-break: break-word;
}
.qdone-files { margin: 0 0 14px; }
.qshare {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  height: 46px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
  background: rgba(37,211,102,0.12);
  border: 1px solid rgba(37,211,102,0.4);
  border-radius: 999px;
  cursor: pointer;
}
.qhint { margin: 8px 0 0; font-size: 0.8rem; line-height: 1.45; color: rgba(245,240,232,0.55); }

/* pinned action */
.qactions { margin-top: 14px; }
.qcta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 58px;
  padding: 0 8px 0 24px;
  border: 0;
  border-radius: 999px;
  background: #b84e22;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(196,87,42,0.38);
  transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}
.qcta[hidden] { display: none; }
.qgo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #b84e22;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, color 0.25s;
}
.qcta.is-off { background: rgba(245,240,232,0.08); color: rgba(245,240,232,0.4); box-shadow: none; cursor: default; }
.qcta.is-off .qgo { background: rgba(245,240,232,0.12); color: rgba(245,240,232,0.4); }
@media (hover: hover) { .qcta:not(.is-off):hover { background: var(--accent-light); } }

/* ---------- Phones: the card fills the screen under the floating nav ---------- */
@media (max-width: 768px) {
  .mq-section { padding: 84px 12px 14px; }
  .qcard {
    max-width: none;
    height: calc(100vh - 98px);
    height: calc(100svh - 98px);
    padding: 22px 18px 16px;
  }
  .mq-form { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .qq { font-size: 1.8rem; }
  .qrow { min-height: clamp(46px, calc((100svh - 372px) / 7), 56px); }
  .qrows { gap: 6px; }
  /* a page that fits should not jump around when the step changes */
  .qstep.active { animation-duration: 0.3s; }
}
@media (max-width: 360px) {
  .qq { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .qstep.active { animation: none; }
}
