/* quote.css — request-a-quote dialog + floating entry.
   Self-contained on purpose: this sheet loads on every surface (guide,
   profile, tool, home, legacy), so it carries its own namespaced tokens.
   Values mirror the v4 marketplace system in guide-premium.css. */

.qd, .qd-fab {
  --qd-ink: #1a2733;
  --qd-ink-strong: #10202e;
  --qd-white: #ffffff;
  --qd-soft: #f7f7f5;
  --qd-line: #e8eaec;
  --qd-line-strong: #d3d8dc;
  --qd-muted: #5d6772;
  --qd-faint: #8a939c;
  --qd-coral: #d95745;
  --qd-coral-dark: #c24736;
  --qd-focus: #4fc3c0;
  --qd-font: "CSDP Inter", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --qd-sh-float: 0 3px 10px rgba(16, 32, 46, .1), 0 14px 36px rgba(16, 32, 46, .14);
  font-family: var(--qd-font);
}

/* ---- dialog shell ---- */

.qd {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86dvh, 860px);
  padding: 0;
  border: 1px solid var(--qd-line);
  border-radius: 16px;
  color: var(--qd-ink);
  background: var(--qd-white);
  box-shadow: var(--qd-sh-float);
  overscroll-behavior: contain;
}

.qd::backdrop {
  background: rgba(16, 32, 46, .46);
}

.qd__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  background: var(--qd-white);
  border-bottom: 1px solid var(--qd-line);
}

.qd__title {
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.015em;
  color: var(--qd-ink-strong);
}

.qd__sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--qd-muted);
}

.qd__close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--qd-muted);
  cursor: pointer;
}

.qd__close:hover {
  background: var(--qd-soft);
  color: var(--qd-ink);
}

.qd__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ---- form ---- */

.qd__form {
  padding: 16px 22px 22px;
}

.qd__for {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--qd-line);
  border-radius: 10px;
  background: var(--qd-soft);
}

.qd__for-clear {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: var(--qd-muted);
  text-decoration: underline;
  cursor: pointer;
}

.qd__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qd__field {
  display: block;
  margin: 0 0 14px;
}

.qd__label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--qd-ink-strong);
}

.qd__hint {
  font-weight: 480;
  color: var(--qd-faint);
}

.qd__help {
  margin: -2px 0 8px;
  font-size: 12.5px;
  color: var(--qd-muted);
}

.qd__field input[type="text"],
.qd__field input[type="tel"],
.qd__field input[type="email"],
.qd__field select,
.qd__field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--qd-line-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: var(--qd-ink);
  background: var(--qd-white);
}

.qd__field textarea {
  resize: vertical;
  min-height: 76px;
}

.qd__field input:focus-visible,
.qd__field select:focus-visible,
.qd__field textarea:focus-visible,
.qd__chip input:focus-visible + span,
.qd__consent input:focus-visible,
.qd__submit:focus-visible,
.qd__close:focus-visible,
.qd__addphoto:focus-visible {
  outline: 2px solid var(--qd-focus);
  outline-offset: 1px;
}

/* ---- photos ---- */

.qd__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qd__addphoto {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 76px;
  height: 76px;
  border: 1.5px dashed var(--qd-line-strong);
  border-radius: 12px;
  background: var(--qd-white);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--qd-muted);
  cursor: pointer;
}

.qd__addphoto:hover {
  border-color: var(--qd-faint);
  color: var(--qd-ink);
}

.qd__addphoto svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.qd__thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border: 1px solid var(--qd-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--qd-soft);
}

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

.qd__thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(16, 32, 46, .62);
  color: #fff;
  cursor: pointer;
}

.qd__thumb-x svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* ---- when chips ---- */

.qd__when {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.qd__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qd__chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qd__chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--qd-line-strong);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--qd-ink);
  background: var(--qd-white);
  cursor: pointer;
}

.qd__chip input:checked + span {
  border-color: var(--qd-ink-strong);
  background: var(--qd-ink-strong);
  color: var(--qd-white);
}

/* ---- honeypot ---- */

.qd__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- consent + submit ---- */

.qd__consent {
  display: flex;
  gap: 10px;
  margin: 2px 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--qd-muted);
}

.qd__consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--qd-coral);
}

.qd__consent a {
  color: inherit;
  text-decoration: underline;
}

.qd__err {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #b3372b;
}

.qd__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 660;
  color: var(--qd-white);
  background: var(--qd-coral);
  box-shadow: 0 6px 16px -6px rgba(217, 87, 69, .55);
  cursor: pointer;
  transition: background-color 140ms ease-out;
}

.qd__submit:hover {
  background: var(--qd-coral-dark);
}

.qd__submit[disabled] {
  opacity: .6;
  cursor: default;
}

.qd__fine {
  margin: 12px 0 0;
  font-size: 12.5px;
  text-align: center;
  color: var(--qd-faint);
}

.qd__fine a {
  color: inherit;
  text-decoration: underline;
}

/* ---- done state ---- */

.qd__done {
  padding: 34px 26px 28px;
  text-align: center;
}

.qd__done-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(20, 125, 128, .1);
  color: #147d80;
}

.qd__done-ic svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qd__done-title {
  margin: 14px 0 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.01em;
  color: var(--qd-ink-strong);
}

.qd__done-p {
  margin: 6px 0 18px;
  font-size: 14px;
  color: var(--qd-muted);
}

.qd__submit--done {
  width: auto;
  min-width: 160px;
}

/* ---- floating entry pill (pages without their own quote CTA) ---- */

.qd-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 660;
  color: var(--qd-white);
  background: var(--qd-coral);
  box-shadow: 0 2px 8px rgba(16, 32, 46, .12), 0 8px 28px rgba(16, 32, 46, .18);
  cursor: pointer;
}

.qd-fab:hover {
  background: var(--qd-coral-dark);
}

.qd-fab svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- ink skin for quote buttons that sit beside a coral Call action ----
   The call keeps the one coral accent; the quote entry wears ink. The base
   .btn geometry comes from the page's own stylesheet (profile-v4.css). */

.btn--quote {
  color: #ffffff;
  background: #10202e;
  border-color: #10202e;
  font: inherit;
  cursor: pointer;
}

/* Inside the profile action card the quote button fills the column like the
   anchor actions beside it (buttons do not inherit the anchor width). */
.action .btn--quote {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.btn--quote:hover {
  background: #1a2733;
  border-color: #1a2733;
  color: #ffffff;
}

/* ---- small screens: full sheet ---- */

@media (max-width: 640px) {
  .qd {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .qd__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .qd__submit {
    min-height: 50px;
  }

  .qd-fab {
    right: 14px;
    bottom: 14px;
  }
}

@media print {
  .qd, .qd-fab {
    display: none !important;
  }
}
