/* Custom-size table quote wizard — matches the falcon theme (gold #bc8246, Mulish). */

.tq {
  --tq-gold: #bc8246;
  --tq-gold-dark: #9c6a36;
  --tq-gold-soft: #f6ede3;
  --tq-ink: #232323;
  --tq-muted: #8a8a94;
  --tq-line: #e6e1da;
  --tq-bg: #f9f9f9;
  --tq-white: #fff;
  --tq-danger: #c0392b;
  --tq-success: #3c8d4f;
  --tq-radius: 14px;
  --tq-ease: cubic-bezier(.22, .8, .24, 1);
  font-family: "Mulish", Roboto, sans-serif;
}

.tq-root {
  margin: 1.25rem 0 .5rem;
  container-type: inline-size;
}

.tq svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- CTA card ---------- */

.tq-cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  overflow: hidden;
  text-align: left;
  color: var(--tq-ink);
  background: linear-gradient(135deg, var(--tq-white) 0%, var(--tq-gold-soft) 100%);
  border: 1px solid var(--tq-line);
  border-radius: var(--tq-radius);
  cursor: pointer;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--tq-ease);
}

.tq-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .75) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: tq-shine 5s ease-in-out 1.2s infinite;
  pointer-events: none;
}

.tq-cta:hover,
.tq-cta:focus-visible {
  border-color: var(--tq-gold);
  box-shadow: 0 10px 28px -14px rgba(188, 130, 70, .55);
  transform: translateY(-2px);
  outline: none;
}

.tq-cta__icon {
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--tq-white);
  background: var(--tq-gold);
  border-radius: 12px;
  transition: transform .4s var(--tq-ease);
}

.tq-cta__icon svg { width: 26px; height: 26px; }
.tq-cta:hover .tq-cta__icon { transform: rotate(-12deg) scale(1.06); }

.tq-cta__body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.tq-cta__title { font-size: 15px; font-weight: 700; }
.tq-cta__text { font-size: 13px; line-height: 1.4; color: var(--tq-muted); }

.tq-cta__action {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tq-gold);
  white-space: nowrap;
}

.tq-cta__action svg { width: 18px; height: 18px; transition: transform .3s var(--tq-ease); }
.tq-cta:hover .tq-cta__action svg { transform: translateX(4px); }

/* ---------- Overlay & dialog ---------- */

.tq-overlay {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  justify-content: flex-end;
  background: rgba(24, 20, 16, 0);
  backdrop-filter: blur(0);
  transition: background .35s, backdrop-filter .35s;
}

.tq-overlay[hidden] { display: none; }
.tq-overlay.is-open { background: rgba(24, 20, 16, .45); backdrop-filter: blur(3px); }

.tq-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  height: 100%;
  overflow: hidden;
  background: var(--tq-white);
  box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .35);
  transform: translateX(100%);
  transition: transform .45s var(--tq-ease);
  outline: none;
}

.tq-overlay.is-open .tq-dialog { transform: none; }

.tq-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--tq-line);
}

.tq-head__img { flex-shrink: 0; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.tq-head__text { flex: 1; min-width: 0; }
.tq-head__eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--tq-gold); text-transform: uppercase; }
.tq-head__title { margin: 2px 0 6px; overflow: hidden; font-size: 16px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }

.tq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--tq-ink);
  background: var(--tq-bg);
  border-radius: 999px;
}

.tq-dot { width: 8px; height: 8px; background: var(--tq-gold); border-radius: 50%; }

.tq-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--tq-ink);
  background: var(--tq-bg);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .3s var(--tq-ease), background .2s;
}

.tq-close svg { width: 20px; height: 20px; }
.tq-close:hover { background: var(--tq-gold-soft); transform: rotate(90deg); }

/* ---------- Progress ---------- */

.tq-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 16px 22px 18px;
  list-style: none;
}

.tq-steps__item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 25%;
  font-size: 11px;
  color: var(--tq-muted);
  transition: color .3s;
}

.tq-steps__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 800;
  background: var(--tq-white);
  border: 2px solid var(--tq-line);
  border-radius: 50%;
  transition: background .35s, border-color .35s, color .35s, transform .35s var(--tq-ease);
}

.tq-steps__item.is-active { color: var(--tq-ink); font-weight: 700; }
.tq-steps__item.is-active .tq-steps__num { color: var(--tq-white); background: var(--tq-gold); border-color: var(--tq-gold); transform: scale(1.12); }
.tq-steps__item.is-done .tq-steps__num { color: var(--tq-gold); border-color: var(--tq-gold); }

.tq-steps__bar {
  position: absolute;
  top: 29px;
  right: calc(22px + 12.5%);
  left: calc(22px + 12.5%);
  height: 2px;
  background: var(--tq-line);
}

.tq-steps__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--tq-gold);
  transition: width .5s var(--tq-ease);
}

/* ---------- Form body ---------- */

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

.tq-step {
  flex: 1;
  padding: 4px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: tq-step-in .45s var(--tq-ease) both;
}

.tq-step[hidden] { display: none; }
.tq-step.is-back { animation-name: tq-step-in-back; }

.tq-lead { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--tq-muted); }

.tq-sr,
.tq-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Live preview */

.tq-preview {
  margin-bottom: 16px;
  padding: 8px;
  background:
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, .06) 1px, transparent 0) 0 0 / 14px 14px,
    var(--tq-bg);
  border-radius: var(--tq-radius);
}

.tq-preview--small { margin: 16px 0 0; }
.tq-preview__svg { display: block; width: 100%; height: auto; }
.tq-preview__svg .tq-p-top,
.tq-preview__svg .tq-p-side,
.tq-preview__svg .tq-p-leg,
.tq-preview__svg .tq-p-leaf { transition: all .45s var(--tq-ease); }
.tq-preview__svg text { font-family: "Mulish", Roboto, sans-serif; font-size: 11px; font-weight: 700; fill: var(--tq-ink); stroke: none; }
.tq-preview__svg .tq-p-caption { font-size: 9px; font-weight: 800; letter-spacing: .1em; fill: var(--tq-muted); text-transform: uppercase; }
.tq-preview__svg .tq-p-leaf { animation: tq-leaf-pulse 1.8s ease-in-out infinite; }

/* Dimension fields */

.tq-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tq-field { position: relative; min-width: 0; }
.tq-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--tq-ink); }
.tq-label small { font-weight: 400; color: var(--tq-muted); }

.tq-stepper {
  display: flex;
  align-items: center;
  height: 48px;
  background: var(--tq-white);
  border: 1.5px solid var(--tq-line);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.tq-stepper:focus-within { border-color: var(--tq-gold); box-shadow: 0 0 0 4px rgba(188, 130, 70, .14); }

.tq-stepper__btn {
  flex: 0 0 32px;
  height: 100%;
  padding: 0;
  font-size: 18px;
  color: var(--tq-gold);
  background: none;
  border: 0;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform .15s;
}

.tq-stepper__btn:active { transform: scale(.85); }

.tq-stepper .tq-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  background: none;
  border: 0;
  outline: none;
}

.tq-unit { padding-right: 2px; font-size: 12px; color: var(--tq-muted); }

.tq-std {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 13px;
  background: var(--tq-gold-soft);
  border-radius: 10px;
}

.tq-link {
  padding: 0;
  font-weight: 700;
  color: var(--tq-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Choices */

.tq-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tq-choice { position: relative; margin: 0; cursor: pointer; }
.tq-choice input,
.tq-pill input,
.tq-check input { position: absolute; opacity: 0; pointer-events: none; }

.tq-choice__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  height: 100%;
  padding: 16px;
  background: var(--tq-white);
  border: 1.5px solid var(--tq-line);
  border-radius: var(--tq-radius);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--tq-ease);
}

.tq-choice:hover .tq-choice__card { transform: translateY(-2px); }
.tq-choice input:focus-visible + .tq-choice__card { box-shadow: 0 0 0 4px rgba(188, 130, 70, .2); }
.tq-choice input:checked + .tq-choice__card { border-color: var(--tq-gold); box-shadow: 0 12px 26px -16px rgba(188, 130, 70, .7); }

.tq-choice__icon { width: 54px; height: 36px; margin-bottom: 6px; color: var(--tq-gold); }
.tq-choice__leaf { stroke-dasharray: 3 3; }
.tq-choice input:checked + .tq-choice__card .tq-choice__leaf { fill: var(--tq-gold-soft); animation: tq-dash 1s linear infinite; }
.tq-choice__title { font-size: 15px; font-weight: 700; }
.tq-choice__hint { font-size: 12px; line-height: 1.4; color: var(--tq-muted); }

.tq-choice__tick {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--tq-white);
  background: var(--tq-gold);
  border-radius: 50%;
  transform: scale(0);
  transition: transform .35s var(--tq-ease);
}

.tq-choice__tick svg { width: 14px; height: 14px; stroke-width: 3; }
.tq-choice input:checked + .tq-choice__card .tq-choice__tick { transform: scale(1); }

.tq-reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--tq-ease), opacity .3s; opacity: 0; }
.tq-reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.tq-reveal__inner { min-height: 0; overflow: hidden; }
.tq-reveal .tq-field { max-width: 220px; margin-top: 16px; }
.tq-total { margin: 10px 0 0; font-size: 14px; }
.tq-total strong { color: var(--tq-gold); }

/* Contact */

.tq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.tq-field--full { grid-column: 1 / -1; }

.tq-input--text {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  background: var(--tq-white);
  border: 1.5px solid var(--tq-line);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.tq-input--text:focus { border-color: var(--tq-gold); box-shadow: 0 0 0 4px rgba(188, 130, 70, .14); }
.tq-textarea { height: auto; padding: 12px 14px; resize: vertical; }

.tq-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tq-pill { margin: 0; cursor: pointer; }

.tq-pill span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  background: var(--tq-bg);
  border: 1.5px solid transparent;
  border-radius: 999px;
  transition: background .25s, border-color .25s, color .25s;
}

.tq-pill svg { width: 16px; height: 16px; }
.tq-pill input:checked + span { color: var(--tq-gold-dark); background: var(--tq-gold-soft); border-color: var(--tq-gold); }
.tq-pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(188, 130, 70, .2); }

.tq-check { display: flex; gap: 10px; margin: 0; font-size: 13px; line-height: 1.5; cursor: pointer; }

.tq-check__box {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--tq-white);
  border: 1.5px solid var(--tq-line);
  border-radius: 6px;
  transition: background .2s, border-color .2s;
}

.tq-check__box svg { width: 14px; height: 14px; stroke-width: 3; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s .05s; }
.tq-check input:checked + .tq-check__box { background: var(--tq-gold); border-color: var(--tq-gold); }
.tq-check input:checked + .tq-check__box svg { stroke-dashoffset: 0; }
.tq-check input:focus-visible + .tq-check__box { box-shadow: 0 0 0 4px rgba(188, 130, 70, .2); }
.tq-check a { color: var(--tq-gold); text-decoration: underline; }

/* Errors */

.tq-error { max-height: 0; margin: 0; overflow: hidden; font-size: 12px; color: var(--tq-danger); transition: max-height .3s, margin .3s; }
.tq-field.is-invalid .tq-error { max-height: 60px; margin-top: 6px; }
.tq-field.is-invalid .tq-stepper,
.tq-field.is-invalid .tq-input--text,
.tq-field.is-invalid .tq-choice__card,
.tq-field.is-invalid .tq-check__box { border-color: var(--tq-danger); }
.tq-field.is-shaking { animation: tq-shake .4s; }
.tq-error--form { max-height: none; margin-top: 10px; }

/* Summary */

.tq-summary { margin: 0; overflow: hidden; border: 1px solid var(--tq-line); border-radius: var(--tq-radius); }

.tq-summary__row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tq-line);
  animation: tq-row-in .45s var(--tq-ease) both;
}

.tq-summary__row:last-child { border-bottom: 0; }
.tq-summary__icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--tq-gold); background: var(--tq-gold-soft); border-radius: 10px; }
.tq-summary__icon svg { width: 18px; height: 18px; }
.tq-summary dt { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--tq-muted); text-transform: uppercase; }
.tq-summary dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; word-break: break-word; }

/* Footer */

.tq-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  background: var(--tq-white);
  border-top: 1px solid var(--tq-line);
}

.tq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, transform .2s var(--tq-ease), box-shadow .2s, opacity .2s;
}

.tq-btn svg { width: 18px; height: 18px; }
.tq-btn--primary { flex: 1; color: var(--tq-white); background: var(--tq-gold); box-shadow: 0 10px 22px -12px rgba(188, 130, 70, .9); }
.tq-btn--primary:hover { background: var(--tq-gold-dark); }
.tq-btn--primary:active { transform: scale(.98); }
.tq-btn--primary[disabled] { opacity: .7; cursor: progress; }
.tq-btn--primary.is-loading svg { animation: tq-spin .8s linear infinite; }
.tq-btn--ghost { color: var(--tq-ink); background: var(--tq-bg); }
.tq-btn--ghost:hover { background: var(--tq-gold-soft); }
.tq-btn--ghost[hidden] { display: none; }

/* Success */

.tq-success {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  text-align: center;
  animation: tq-step-in .5s var(--tq-ease) both;
}

.tq-success[hidden] { display: none; }
.tq-success__icon { width: 96px; height: 96px; margin-bottom: 18px; color: var(--tq-success); stroke-width: 3; }
.tq-success__icon circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: tq-draw .7s .1s var(--tq-ease) forwards; }
.tq-success__icon path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: tq-draw .45s .7s var(--tq-ease) forwards; }
.tq-success__title { margin: 0 0 10px; font-size: 22px; font-weight: 800; outline: none; }
.tq-success__text { max-width: 360px; margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--tq-muted); }
.tq-success .tq-btn { flex: 0 0 auto; }

.tq-toast {
  position: absolute;
  bottom: 88px;
  left: 50%;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--tq-white);
  white-space: nowrap;
  background: var(--tq-ink);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: tq-toast 3.2s var(--tq-ease) both;
}

.tq-toast[hidden] { display: none; }

/* The product column is narrow on tablets and small laptops, so the CTA adapts to its own width. */
@container (max-width: 480px) {
  .tq-cta { flex-wrap: wrap; }
  .tq-cta__body { flex-basis: calc(100% - 60px); }
  .tq-cta__action { width: 100%; justify-content: center; padding-top: 10px; border-top: 1px dashed var(--tq-line); }
}

/* ---------- Mobile: bottom sheet ---------- */

@media (max-width: 575px) {
  .tq-overlay { align-items: flex-end; }
  .tq-dialog { width: 100%; height: 94%; height: 94dvh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .tq-dialog::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; background: var(--tq-line); border-radius: 4px; transform: translateX(-50%); }
  .tq-head { padding: 22px 16px 12px; }
  .tq-steps { padding: 12px 16px 14px; }
  .tq-steps__bar { top: 25px; right: calc(16px + 12.5%); left: calc(16px + 12.5%); }
  .tq-steps__label { display: none; }
  .tq-step { padding: 4px 16px 18px; }
  .tq-dims { gap: 8px; }
  .tq-stepper__btn { flex-basis: 26px; }
  .tq-stepper .tq-input { font-size: 16px; }
  .tq-unit { display: none; }
  .tq-grid { grid-template-columns: 1fr; }
  .tq-foot { padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 380px) {
  .tq-choices { grid-template-columns: 1fr; }
}

/* Locks page scroll while the dialog is open; JS sets body top to the saved scroll offset. */
html.tq-locked body {
  position: fixed;
  right: 0;
  left: 0;
  overflow: hidden;
}

/* ---------- Motion ---------- */

@keyframes tq-shine { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes tq-step-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes tq-step-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes tq-row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tq-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes tq-draw { to { stroke-dashoffset: 0; } }
@keyframes tq-dash { to { stroke-dashoffset: -12; } }
@keyframes tq-leaf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes tq-spin { to { transform: rotate(360deg); } }
@keyframes tq-toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }

@media (prefers-reduced-motion: reduce) {
  .tq *,
  .tq *::before,
  .tq *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .tq-cta::after { display: none; }
}
