.tqq-widget {
  --tqq-primary: #217fc5;
  --tqq-primary-dark: color-mix(in srgb, var(--tqq-primary) 78%, #0d3552);
  --tqq-primary-soft: color-mix(in srgb, var(--tqq-primary) 6%, #ffffff);
  --tqq-text: #253746;
  --tqq-muted: #667785;
  --tqq-line: #dce8f0;
  --tqq-white: #ffffff;
  max-width: 820px;
  margin: 28px auto;
  padding: 0 18px;
  color: var(--tqq-text);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  scroll-margin-top: 150px;
}

.tqq-widget * { box-sizing: border-box; }

.tqq-card {
  overflow: hidden;
  border: 1px solid var(--tqq-line);
  border-top: 4px solid var(--tqq-primary);
  border-radius: 22px;
  background: var(--tqq-white);
  box-shadow: 0 18px 48px rgba(32, 78, 112, .10);
}

.tqq-heading {
  padding: 30px 34px 27px;
  border-bottom: 1px solid var(--tqq-line);
  background: var(--tqq-primary-soft);
}

.tqq-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--tqq-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.tqq-heading h2 {
  margin: 0 0 8px;
  color: var(--tqq-text);
  font-family: inherit;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.tqq-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--tqq-muted);
  font-size: 15px;
  line-height: 1.55;
}

.tqq-form {
  padding: 28px 34px 24px;
  background: #fff;
}

.tqq-fieldset {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.tqq-fieldset legend,
.tqq-field > span,
.tqq-panel-label {
  display: block;
  margin-bottom: 8px;
  color: #3b4d5a;
  font-size: 12px;
  font-weight: 700;
}

.tqq-field > span small {
  margin-left: 3px;
  color: var(--tqq-muted);
  font-size: 10px;
  font-weight: 500;
}

.tqq-services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tqq-services label { position: relative; cursor: pointer; }
.tqq-services input { position: absolute; opacity: 0; pointer-events: none; }

.tqq-service-card {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  padding: 13px 14px;
  border: 1px solid var(--tqq-line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.tqq-service-title {
  color: var(--tqq-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.tqq-service-copy {
  margin-top: 4px;
  color: var(--tqq-muted);
  font-size: 11px;
  line-height: 1.3;
}

.tqq-services label:hover .tqq-service-card { border-color: color-mix(in srgb, var(--tqq-primary) 48%, transparent); }
.tqq-services input:focus-visible + .tqq-service-card { outline: 3px solid color-mix(in srgb, var(--tqq-primary) 17%, transparent); outline-offset: 2px; }
.tqq-services input:checked + .tqq-service-card {
  border-color: var(--tqq-primary);
  background: var(--tqq-primary-soft);
  box-shadow: 0 0 0 1px var(--tqq-primary);
}

.tqq-panel[hidden],
.tqq-extras[hidden] { display: none !important; }

.tqq-panel-label { margin: 1px 0 10px; }

.tqq-grid { display: grid; gap: 13px; }
.tqq-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tqq-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tqq-field { display: block; margin-bottom: 16px; }

.tqq-field input,
.tqq-field select,
.tqq-field textarea {
  width: 100%;
  min-height: 51px;
  padding: 12px 14px;
  border: 1px solid #d8e2e9;
  border-radius: 12px;
  background: #fff;
  color: var(--tqq-text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.tqq-field input::placeholder { color: #9aa8b2; }
.tqq-field input:focus,
.tqq-field select:focus,
.tqq-field textarea:focus {
  border-color: var(--tqq-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tqq-primary) 13%, transparent);
}

.tqq-office-panel {
  margin-bottom: 5px;
  padding: 16px 16px 0;
  border: 1px solid var(--tqq-line);
  border-radius: 14px;
  background: #fbfdff;
}

.tqq-common-details { margin-top: 1px; }

.tqq-extras {
  margin: 1px 0 18px;
  overflow: hidden;
  border: 1px solid var(--tqq-line);
  border-radius: 12px;
  background: #fff;
}

.tqq-extras summary {
  position: relative;
  padding: 14px 42px 14px 15px;
  cursor: pointer;
  color: #455967;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.tqq-extras summary::-webkit-details-marker { display: none; }
.tqq-extras summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--tqq-primary);
  font-size: 21px;
  font-weight: 400;
  transform: translateY(-52%);
}
.tqq-extras[open] summary::after { content: "−"; }

.tqq-extra-list { padding: 0 15px 10px; }
.tqq-extra-list label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #e8eff4;
  color: var(--tqq-muted);
  font-size: 13px;
}
.tqq-extra-list input { width: 17px; height: 17px; accent-color: var(--tqq-primary); }
.tqq-extra-list strong { color: var(--tqq-primary-dark); font-size: 12px; }

.tqq-estimate {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 20px 0 25px;
  padding: 18px 19px;
  border: 1px solid color-mix(in srgb, var(--tqq-primary) 25%, transparent);
  border-radius: 14px;
  background: var(--tqq-primary-soft);
}

.tqq-estimate span {
  color: #506979;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tqq-estimate strong {
  color: var(--tqq-primary-dark);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.025em;
}

.tqq-contact-intro {
  margin: 0 0 17px;
  padding-top: 22px;
  border-top: 1px solid var(--tqq-line);
}
.tqq-contact-intro h3 { margin: 0 0 5px; color: var(--tqq-text); font-size: 19px; font-weight: 700; line-height: 1.25; }
.tqq-contact-intro p { margin: 0; color: var(--tqq-muted); font-size: 13px; line-height: 1.5; }
.tqq-contact-grid .tqq-field { margin-bottom: 18px; }

.tqq-button {
  width: 100%;
  min-height: 55px;
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--tqq-primary);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--tqq-primary) 20%, transparent);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.tqq-button:hover { background: var(--tqq-primary-dark); transform: translateY(-1px); }
.tqq-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--tqq-primary) 22%, transparent); outline-offset: 3px; }
.tqq-button:disabled { cursor: wait; opacity: .68; transform: none; }

.tqq-button-note { margin: 11px 0 0; color: #7c8c98; font-size: 11px; line-height: 1.45; text-align: center; }
.tqq-message { margin: 0; padding: 20px; border-radius: 13px; font-size: 14px; line-height: 1.6; text-align: center; }
.tqq-message[hidden] { display: none !important; }
.tqq-message.is-success { color: #265a78; border: 1px solid #c8dfed; background: #f1f8fc; }
.tqq-message.is-error { margin-top: 14px; color: #8b342d; border: 1px solid #efcbc6; background: #fff4f2; }
.tqq-service-note { margin: 0; padding: 0 34px 24px; color: #8696a1; background: #fff; font-size: 11px; text-align: center; }
.tqq-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.tqq-form-fields[hidden] { display: none !important; }
.tqq-form.is-complete { padding-top: 28px; padding-bottom: 28px; }

@media (max-width: 720px) {
  .tqq-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tqq-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tqq-common-details .tqq-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .tqq-widget { margin: 16px auto; padding: 0 10px; }
  .tqq-card { border-radius: 17px; }
  .tqq-heading { padding: 24px 20px 22px; }
  .tqq-heading h2 { font-size: 28px; }
  .tqq-heading p { font-size: 14px; }
  .tqq-form { padding: 23px 18px 20px; }
  .tqq-service-card { min-height: 64px; }
  .tqq-field input, .tqq-field select { min-height: 53px; font-size: 16px; }
  .tqq-estimate { padding: 16px; }
  .tqq-estimate strong { font-size: 26px; }
  .tqq-service-note { padding: 0 18px 22px; }
}

@media (max-width: 480px) {
  .tqq-grid-2,
  .tqq-grid-3 { grid-template-columns: 1fr; }
  .tqq-common-details .tqq-field:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tqq-widget *, .tqq-widget *::before, .tqq-widget *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* Floating estimate call-to-action */
.tqq-floating-cta {
  --tqq-floating-primary: #217fc5;
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 99998;
  display: inline-flex;
  min-height: 56px;
  max-width: calc(100vw - 28px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 21px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: var(--tqq-floating-primary);
  color: #fff !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 13px 32px color-mix(in srgb, var(--tqq-floating-primary) 28%, transparent);
  -webkit-font-smoothing: antialiased;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.tqq-floating-right { right: 22px; }
.tqq-floating-left { left: 22px; }

.tqq-floating-cta:hover {
  color: #fff !important;
  background: color-mix(in srgb, var(--tqq-floating-primary) 84%, #103d5d);
  box-shadow: 0 16px 38px color-mix(in srgb, var(--tqq-floating-primary) 34%, transparent);
  transform: translateY(-2px);
}

.tqq-floating-cta:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tqq-floating-primary) 25%, transparent);
  outline-offset: 4px;
}

.tqq-floating-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

.tqq-floating-icon svg { display: block; }
.tqq-floating-copy { white-space: nowrap; }

.tqq-card { transition: box-shadow .3s ease, border-color .3s ease; }
.tqq-widget.tqq-is-highlighted .tqq-card {
  border-color: color-mix(in srgb, var(--tqq-primary) 58%, #ffffff);
  box-shadow: 0 18px 48px rgba(32, 78, 112, .12), 0 0 0 4px color-mix(in srgb, var(--tqq-primary) 12%, transparent);
}

@media (max-width: 640px) {
  .tqq-floating-cta {
    bottom: max(14px, env(safe-area-inset-bottom));
    min-height: 52px;
    padding: 0 16px;
    font-size: 13px;
  }

  .tqq-floating-right { right: 14px; }
  .tqq-floating-left { left: 14px; }
  .tqq-floating-icon { width: 28px; height: 28px; flex-basis: 28px; }
}

@media (max-width: 390px) {
  .tqq-floating-cta { gap: 8px; padding: 0 14px; }
  .tqq-floating-copy { max-width: 225px; overflow: hidden; text-overflow: ellipsis; }
}

@media print {
  .tqq-floating-cta { display: none !important; }
}

/* Customer chat */
.tqq-chat-root {
  --tqq-chat-primary: #217fc5;
  position: fixed;
  right: 22px;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 99999;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

.tqq-chat-root.tqq-chat-left {
  right: auto;
  left: 22px;
}

.tqq-chat-root.tqq-chat-with-quote {
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
}

.tqq-chat-toggle {
  display: inline-flex;
  min-height: 56px;
  max-width: calc(100vw - 28px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: #fff;
  color: #263b4a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 13px 34px rgba(29, 62, 85, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.tqq-chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(29, 62, 85, .23);
}

.tqq-chat-toggle:focus-visible,
.tqq-chat-close:focus-visible,
.tqq-chat-form button:focus-visible,
.tqq-chat-quick button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tqq-chat-primary) 24%, transparent);
  outline-offset: 3px;
}

.tqq-chat-toggle-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--tqq-chat-primary);
  color: #fff;
}

.tqq-chat-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #dce8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(25, 57, 79, .23);
  color: #253746;
}

.tqq-chat-left .tqq-chat-panel {
  right: auto;
  left: 0;
}

.tqq-chat-panel[hidden] { display: none !important; }

.tqq-chat-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 14px 18px;
  background: var(--tqq-chat-primary);
  color: #fff;
}

.tqq-chat-header > div { min-width: 0; }
.tqq-chat-header strong,
.tqq-chat-header span { display: block; }
.tqq-chat-header strong { font-size: 15px; line-height: 1.25; }
.tqq-chat-header span { margin-top: 3px; color: rgba(255,255,255,.78); font-size: 11px; }

.tqq-chat-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  color: #fff;
  font: inherit;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.tqq-chat-messages {
  height: 360px;
  max-height: min(48vh, 430px);
  overflow-y: auto;
  padding: 18px 15px 10px;
  background: #f8fbfd;
  scroll-behavior: smooth;
}

.tqq-chat-message {
  display: flex;
  margin: 0 0 11px;
}

.tqq-chat-message > div {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tqq-chat-message.is-assistant { justify-content: flex-start; }
.tqq-chat-message.is-assistant > div {
  border: 1px solid #e0e9ef;
  border-bottom-left-radius: 5px;
  background: #fff;
  color: #334956;
}

.tqq-chat-message.is-user { justify-content: flex-end; }
.tqq-chat-message.is-user > div {
  border-bottom-right-radius: 5px;
  background: var(--tqq-chat-primary);
  color: #fff;
}

.tqq-chat-message.is-typing > div {
  min-width: 56px;
  color: #70818c;
  letter-spacing: .16em;
}

.tqq-chat-quick {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 12px 8px;
  border-top: 1px solid #e4edf2;
  background: #fff;
  scrollbar-width: none;
}
.tqq-chat-quick::-webkit-scrollbar { display: none; }
.tqq-chat-quick[hidden] { display: none !important; }
.tqq-chat-quick button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--tqq-chat-primary) 27%, #dce8f0);
  border-radius: 999px;
  background: #fff;
  color: color-mix(in srgb, var(--tqq-chat-primary) 78%, #253746);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.tqq-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
  padding: 10px 11px;
  border-top: 1px solid #e4edf2;
  background: #fff;
}

.tqq-chat-form textarea {
  width: 100%;
  min-height: 43px;
  max-height: 110px;
  resize: none;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #d7e2e8;
  border-radius: 12px;
  background: #fff;
  color: #253746;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}

.tqq-chat-form textarea:focus {
  border-color: var(--tqq-chat-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tqq-chat-primary) 12%, transparent);
}

.tqq-chat-form button {
  width: 43px;
  height: 43px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--tqq-chat-primary);
  color: #fff;
  cursor: pointer;
}
.tqq-chat-form button:disabled { cursor: wait; opacity: .58; }
.tqq-chat-form button svg { display: block; margin: auto; }

.tqq-chat-footer {
  padding: 0 12px 8px;
  background: #fff;
  color: #9aa7b0;
  font-size: 9px;
  text-align: center;
}

@media (max-width: 640px) {
  .tqq-chat-root { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .tqq-chat-root.tqq-chat-left { right: auto; left: 14px; }
  .tqq-chat-root.tqq-chat-with-quote { bottom: max(78px, calc(env(safe-area-inset-bottom) + 78px)); }
  .tqq-chat-toggle { min-height: 52px; padding: 0 15px; font-size: 13px; }
  .tqq-chat-toggle-icon { width: 29px; height: 29px; flex-basis: 29px; }
  .tqq-chat-panel { bottom: 62px; width: min(390px, calc(100vw - 28px)); border-radius: 17px; }
  .tqq-chat-messages { height: min(385px, 47vh); }
}

@media (max-width: 390px) {
  .tqq-chat-panel { width: calc(100vw - 20px); }
  .tqq-chat-root { right: 10px; }
  .tqq-chat-root.tqq-chat-left { right: auto; left: 10px; }
}

@media print {
  .tqq-chat-root { display: none !important; }
}
