.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1200;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-launcher:hover { transform: translateY(-2px); }
.chat-launcher__ping {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .24);
  animation: chatPing 2.2s infinite;
}
@keyframes chatPing {
  0% { transform: scale(.9); opacity: .6; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 98px;
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 130px);
  z-index: 1200;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 65px rgba(2, 6, 23, .22);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
}
.chat-widget[hidden] { display: none !important; }
.chat-widget__header {
  padding: 18px 20px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
}
.chat-widget__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.chat-widget__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .9;
}
.chat-widget__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .16);
}
.chat-widget__title { margin: 8px 0 0; font-size: 1.08rem; font-weight: 700; }
.chat-widget__subtitle { margin: 8px 0 0; font-size: .93rem; line-height: 1.55; opacity: .95; }
.chat-widget__close {
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  flex: 0 0 auto;
}
.chat-widget__body {
  padding: 18px;
  overflow: auto;
  max-height: calc(100vh - 240px);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.chat-conversation {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-bubble {
  background: #fff;
  color: #0f172a;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  line-height: 1.55;
}
.chat-bubble--agent { border-top-left-radius: 6px; max-width: 92%; }
.chat-bubble--soft { background: #eff6ff; }
.chat-bubble--user {
  background: #dbeafe;
  margin-left: auto;
  max-width: 88%;
  border-top-right-radius: 6px;
}
.chat-bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
}
.chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #64748b;
  animation: chatDot 1.2s infinite ease-in-out;
}
.chat-dot:nth-child(2) { animation-delay: .15s; }
.chat-dot:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-3px); opacity: 1; }
}
.chat-assistant-panel { margin-top: 16px; }
.chat-progress-card,
.chat-stage-card,
.chat-estimate-card,
.chat-summary-card {
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  margin-bottom: 14px;
}
.chat-progress-card,
.chat-stage-card,
.chat-estimate-card { background: #fff; border: 1px solid rgba(148, 163, 184, .18); }
.chat-progress-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .9rem;
  margin-bottom: 10px;
}
.chat-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.chat-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transition: width .25s ease;
}
.chat-stage-card__label {
  display: inline-flex;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #1d4ed8;
  font-weight: 700;
  margin-bottom: 8px;
}
.chat-stage-card__question { font-size: 1rem; font-weight: 700; color: #0f172a; }
.chat-stage-card__hint { margin-top: 6px; color: #475569; font-size: .88rem; line-height: 1.5; }
.chat-quick-actions,
.chat-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.chat-quick-actions { margin: 0 0 14px; }
.chat-quick-intro {
  margin: 0 0 12px;
  font-size: .9rem;
  color: #475569;
  line-height: 1.5;
}
.chat-quick-actions--offers {
  grid-template-columns: 1fr;
}
.chat-quick-btn,
.chat-option-btn {
  border: 1px solid rgba(59,130,246,.16);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .03);
}
.chat-quick-btn {
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.chat-quick-btn:hover,
.chat-quick-btn:focus-visible,
.chat-option-btn:hover,
.chat-option-btn:focus-visible {
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
  outline: none;
}
.chat-quick-btn__title,
.chat-quick-btn__price,
.chat-quick-btn__cta {
  display: block;
}
.chat-quick-btn__title {
  font-size: 1rem;
}
.chat-quick-btn__price {
  margin-top: 4px;
  font-size: .92rem;
  color: #1d4ed8;
  font-weight: 800;
}
.chat-quick-btn small,
.chat-option-btn small {
  display: block;
  font-weight: 500;
  color: #475569;
  margin-top: 7px;
  line-height: 1.45;
}
.chat-quick-btn__cta {
  margin-top: 10px;
  color: #1d4ed8;
  font-size: .86rem;
  font-weight: 700;
}
.chat-option-btn strong { display: block; font-size: .94rem; }
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chat-suggestion-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: .88rem;
  cursor: pointer;
  color: #0f172a;
}
.chat-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.chat-links a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
  background: #eff6ff;
  padding: 10px 12px;
  border-radius: 999px;
}
.chat-estimate-card__title,
.chat-summary-card__title {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .74;
  margin-bottom: 8px;
}
.chat-estimate-card__content,
.chat-summary-card__content {
  font-size: .94rem;
  line-height: 1.6;
}
.chat-summary-card {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
}
.chat-form { display: grid; gap: 10px; }
.chat-form label { font-size: .92rem; font-weight: 700; color: #0f172a; }
.chat-form input, .chat-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
.chat-form textarea { min-height: 118px; resize: vertical; }
.chat-form__row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.chat-form__consent { font-size: .82rem; color: #475569; line-height: 1.5; }
.chat-form__actions { display: flex; gap: 10px; align-items: center; }
.chat-submit {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  cursor: pointer;
}
.chat-status { font-size: .88rem; color: #475569; }
.chat-status.is-error { color: #b91c1c; }
.chat-status.is-success { color: #166534; }
@media (max-width: 640px) {
  .chat-widget { right: 12px; bottom: 88px; width: calc(100vw - 24px); }
  .chat-launcher { right: 12px; bottom: 14px; }
  .chat-form__row,
  .chat-quick-actions,
  .chat-options-grid { grid-template-columns: 1fr; }
}


* { box-sizing: border-box; }
.chat-widget,
.chat-widget * { box-sizing: border-box; }
.chat-widget img,
.chat-widget svg { max-width: 100%; height: auto; }
.chat-widget__title { line-height: 1.25; }
.chat-widget__subtitle { max-width: 34ch; }
.chat-stage-card__question { line-height: 1.35; }
.chat-option-btn,
.chat-quick-btn,
.chat-links a,
.chat-submit,
.chat-suggestion-chip,
.chat-widget__close { -webkit-tap-highlight-color: transparent; }
.chat-quick-btn,
.chat-option-btn { min-width: 0; }
.chat-links a { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.chat-form input,
.chat-form textarea,
.chat-submit { font-size: 16px; }
.chat-form textarea { line-height: 1.45; }
.chat-status { display: block; line-height: 1.4; }

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .chat-widget {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 84px;
    max-height: calc(100vh - 96px);
    border-radius: 20px;
  }
  .chat-widget__header { padding: 16px; }
  .chat-widget__title { font-size: 0.98rem; }
  .chat-widget__subtitle { font-size: 0.88rem; max-width: none; }
  .chat-widget__close { width: 42px; height: 42px; }
  .chat-widget__body {
    padding: 14px;
    max-height: calc(100vh - 210px);
  }
  .chat-conversation { gap: 10px; }
  .chat-bubble { padding: 11px 12px; font-size: 0.96rem; }
  .chat-progress-card,
  .chat-stage-card,
  .chat-estimate-card,
  .chat-summary-card { padding: 14px; border-radius: 16px; }
  .chat-stage-card__question { font-size: 0.96rem; }
  .chat-stage-card__hint { font-size: 0.84rem; }
  .chat-form__row,
  .chat-quick-actions,
  .chat-options-grid { grid-template-columns: 1fr; }
  .chat-quick-btn,
  .chat-option-btn { padding: 14px 14px; }
  .chat-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .chat-links a { width: 100%; padding: 12px 10px; border-radius: 14px; }
  .chat-form__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .chat-submit {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
  }
  .chat-status { min-height: 20px; }
}

@media (max-width: 420px) {
  .chat-widget {
    left: 8px;
    right: 8px;
    bottom: 78px;
    border-radius: 18px;
  }
  .chat-launcher {
    right: 10px;
    bottom: 10px;
    width: 60px;
    height: 60px;
  }
  .chat-widget__header { padding: 14px; }
  .chat-widget__eyebrow { font-size: 0.72rem; }
  .chat-widget__title { font-size: 0.9rem; }
  .chat-widget__subtitle { font-size: 0.84rem; line-height: 1.45; }
  .chat-widget__body { padding: 12px; }
  .chat-bubble { font-size: 0.93rem; }
  .chat-progress-card__top { font-size: 0.84rem; }
  .chat-stage-card__label { font-size: 0.72rem; }
  .chat-stage-card__question { font-size: 0.92rem; }
  .chat-quick-btn,
  .chat-option-btn { border-radius: 14px; }
  .chat-links { grid-template-columns: 1fr; }
  .chat-form label { font-size: 0.88rem; }
  .chat-form__consent { font-size: 0.78rem; }
}



/* Clickability hardening */
#scw-chat-launcher,
.scw-chat-launcher,
button#scw-chat-launcher,
button.scw-chat-launcher{
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

#scw-chat-launcher *,
.scw-chat-launcher *{
  pointer-events: none !important;
}

#scw-chat-widget,
.scw-chat-widget{
  z-index: 2147483001 !important;
}

body.scw-chat-open #scw-chat-launcher,
body.scw-chat-open .scw-chat-launcher{
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 768px){
  #scw-chat-launcher,
  .scw-chat-launcher{
    right: 14px !important;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
