@charset "utf-8";
/* ==========================================================================
   Tech On Demand — Instant Quote Calculator widget
   Self-contained. Consumes the design tokens declared in main.css
   (--accent, --ink, --radius, …) so it restyles with the rest of the site.
   All rules are namespaced under .toq- to guarantee no collisions.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Launcher — floating action button, bottom-right
   -------------------------------------------------------------------------- */
.toq-launcher {
  position: fixed;
  right: clamp(1rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1.25rem;
  border: 0;
  border-radius: 100px;
  background: var(--accent, #0F7A46);
  color: #fff;
  font-family: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 122, 70, .32);
  transition: transform .2s var(--ease, ease), box-shadow .2s var(--ease, ease),
              background-color .2s var(--ease, ease);
}
.toq-launcher:hover  { background: var(--accent-dark, #0B5F37); transform: translateY(-2px); }
.toq-launcher:focus-visible { outline: 3px solid var(--accent-bright, #4ADE80); outline-offset: 3px; }
.toq-launcher svg    { flex-shrink: 0; }
.toq-launcher[hidden]{ display: none; }

/* --------------------------------------------------------------------------
   Nudge — the timed "try our calculator" bubble
   -------------------------------------------------------------------------- */
.toq-nudge {
  position: fixed;
  right: clamp(1rem, 2vw, 1.5rem);
  bottom: calc(clamp(1rem, 2vw, 1.5rem) + 4.25rem);
  z-index: 9998;
  width: min(19rem, calc(100vw - 2rem));
  padding: 1rem 2.25rem 1rem 1.125rem;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: var(--radius-lg, 18px);
  background: var(--surface, #fff);
  color: var(--slate, #334155);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(11, 35, 24, .14));
  font-size: .9375rem;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  animation: toq-rise .32s var(--ease, ease) both;
}
.toq-nudge strong {
  display: block;
  margin-bottom: .125rem;
  color: var(--ink, #0B2318);
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1rem;
}
.toq-nudge__close {
  position: absolute;
  top: .375rem;
  right: .375rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--slate-2, #64748B);
  cursor: pointer;
  line-height: 1;
}
.toq-nudge__close:hover { background: var(--surface-alt, #F1F8F3); color: var(--ink, #0B2318); }

@keyframes toq-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Panel — the chat surface
   -------------------------------------------------------------------------- */
.toq-panel {
  position: fixed;
  right: clamp(1rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  width: min(24.5rem, calc(100vw - 2rem));
  height: min(38rem, calc(100vh - 2rem));
  border-radius: var(--radius-lg, 18px);
  background: var(--surface, #fff);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(11, 35, 24, .14));
  overflow: hidden;
  animation: toq-rise .28s var(--ease, ease) both;
}
.toq-panel[hidden] { display: none; }

.toq-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.125rem;
  background: var(--ink, #0B2318);
  color: #fff;
}
.toq-head__dot {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent, #0F7A46);
}
.toq-head__txt { flex: 1; min-width: 0; }
.toq-head__title {
  margin: 0;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: .9375rem;
  font-weight: 600;
  color: #fff;
}
.toq-head__sub {
  margin: 0;
  font-size: .75rem;
  color: #A9C7B7;
}
.toq-head__btn {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #A9C7B7;
  cursor: pointer;
}
.toq-head__btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.toq-head__btn:focus-visible { outline: 2px solid var(--accent-bright, #4ADE80); outline-offset: 1px; }

/* Scroll region ---------------------------------------------------------- */
.toq-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.125rem;
  background: var(--surface-alt, #F1F8F3);
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

/* Messages --------------------------------------------------------------- */
.toq-msg {
  max-width: 88%;
  flex-shrink: 0;          /* the log is a flex column — without this, tall
                              children collapse and their content overflows */
  padding: .6875rem .875rem;
  border-radius: 14px;
  font-size: .9063rem;
  line-height: 1.55;
  animation: toq-rise .22s var(--ease, ease) both;
}
.toq-msg--bot {
  align-self: flex-start;
  background: var(--surface, #fff);
  color: var(--slate, #334155);
  border: 1px solid var(--border, #E2E8F0);
  border-bottom-left-radius: 4px;
}
.toq-msg--user {
  align-self: flex-end;
  background: var(--accent, #0F7A46);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.toq-msg strong { color: inherit; }
.toq-msg--bot strong { color: var(--ink, #0B2318); }

/* Typing indicator ------------------------------------------------------- */
.toq-typing {
  align-self: flex-start;
  flex-shrink: 0;
  display: flex;
  gap: .25rem;
  padding: .875rem;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: var(--surface, #fff);
}
.toq-typing span {
  width: .4375rem;
  height: .4375rem;
  border-radius: 50%;
  background: var(--slate-2, #64748B);
  animation: toq-blink 1.3s infinite;
}
.toq-typing span:nth-child(2) { animation-delay: .18s; }
.toq-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes toq-blink { 0%,60%,100% { opacity:.28; } 30% { opacity:1; } }

/* Choice chips ----------------------------------------------------------- */
.toq-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .4375rem;
  padding: .75rem 1.125rem 1rem;
  border-top: 1px solid var(--border, #E2E8F0);
  background: var(--surface, #fff);
  max-height: 15rem;
  overflow-y: auto;
}
.toq-chip {
  padding: .5rem .8125rem;
  border: 1px solid var(--accent, #0F7A46);
  border-radius: 100px;
  background: var(--surface, #fff);
  color: var(--accent, #0F7A46);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .18s var(--ease, ease), color .18s var(--ease, ease);
}
.toq-chip:hover { background: var(--accent, #0F7A46); color: #fff; }
.toq-chip:focus-visible { outline: 2px solid var(--ink, #0B2318); outline-offset: 2px; }
.toq-chip--ghost { border-color: var(--border, #E2E8F0); color: var(--slate-2, #64748B); }
.toq-chip--ghost:hover { background: var(--slate-2, #64748B); border-color: var(--slate-2, #64748B); }
.toq-chip--cta {
  background: var(--accent, #0F7A46);
  color: #fff;
  text-decoration: none;
  display: inline-block;
}
.toq-chip--cta:hover { background: var(--accent-dark, #0B5F37); }

/* Suggestion chips above the ask box ------------------------------------- */
.toq-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  width: 100%;
  margin-bottom: .5rem;
}
.toq-chip--sm {
  padding: .375rem .6875rem;
  font-size: .8125rem;
  border-color: var(--border, #E2E8F0);
  color: var(--slate, #334155);
}
.toq-chip--sm:hover {
  background: var(--accent-wash, #EAF7EE);
  border-color: var(--accent, #0F7A46);
  color: var(--accent-dark, #0B5F37);
}

/* Entry (numeric + free text) -------------------------------------------- */
.toq-entry { display: flex; gap: .4375rem; width: 100%; }
.toq-entry input {
  flex: 1;
  min-width: 0;
  padding: .5rem .75rem;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 100px;
  font-family: inherit;
  font-size: .875rem;
  color: var(--ink, #0B2318);
  background: var(--surface, #fff);
}
.toq-entry--text input { padding-left: .9375rem; }
/* Send button is icon-only, so keep it square rather than pill-wide. */
.toq-entry--text button[type="submit"] {
  display: grid;
  place-items: center;
  width: 2.25rem;
  flex-shrink: 0;
  padding: 0;
  background: var(--accent, #0F7A46);
  border-color: var(--accent, #0F7A46);
  color: #fff;
}
.toq-entry--text button[type="submit"]:hover {
  background: var(--accent-dark, #0B5F37);
  border-color: var(--accent-dark, #0B5F37);
}
.toq-entry input:focus-visible {
  outline: 2px solid var(--accent, #0F7A46);
  outline-offset: 0;
  border-color: var(--accent, #0F7A46);
}

/* Quote summary card ----------------------------------------------------- */
.toq-quote {
  align-self: stretch;
  flex-shrink: 0;          /* see .toq-msg — must not collapse in the flex column */
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 14px;
  background: var(--surface, #fff);
}
.toq-quote__hd {
  padding: .875rem 1rem;
  background: var(--accent-wash, #EAF7EE);
  border-bottom: 1px solid var(--border, #E2E8F0);
}
.toq-quote__hd h4 {
  margin: 0;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: .9375rem;
  color: var(--ink, #0B2318);
}
.toq-quote__rows { padding: .5rem 1rem; }
.toq-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .375rem 0;
  font-size: .8438rem;
  line-height: 1.45;
  color: var(--slate, #334155);
}
.toq-row span:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
/* Items with no rate on the card. Muted and italic so they read as a note on
   the estimate rather than a line that was accidentally left at zero. */
.toq-row--tbd { color: var(--slate-2, #64748B); }
.toq-row--tbd span:last-child { font-style: italic; font-variant-numeric: normal; }
.toq-row--total {
  margin-top: .25rem;
  padding-top: .625rem;
  border-top: 1px solid var(--border, #E2E8F0);
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink, #0B2318);
}
.toq-quote__note {
  margin: 0;
  padding: .75rem 1rem;
  border-top: 1px solid var(--border, #E2E8F0);
  background: var(--surface-alt, #F1F8F3);
  font-size: .75rem;
  line-height: 1.5;
  color: var(--slate-2, #64748B);
}

/* Mobile ----------------------------------------------------------------- */
@media (max-width: 30rem) {
  .toq-panel {
    right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toq-launcher, .toq-nudge, .toq-panel, .toq-msg { animation: none; transition: none; }
  .toq-typing span { animation: none; opacity: .5; }
}
