/* ===================== Your Roofing Canada AI Lead Assistant chat widget ===================== */
/* Isolated in its own file on purpose - keeps this addition easy to find,
   review, or remove without touching the original style.css. */

.icw-launcher {
  position: fixed;
  right: 22px;
  bottom: 170px; /* sits above the existing 2-icon FAB stack (WhatsApp/Call), which spans ~20px-140px from the bottom */
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--glass-border, rgba(201,162,39,0.22));
  background: linear-gradient(160deg, var(--gold, #C9A227), var(--gold-dim, #8A6E1E));
  color: #14120D;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transition: transform 0.2s var(--ease, ease);
}
.icw-launcher:hover { transform: scale(1.06); }
.icw-launcher svg { width: 28px; height: 28px; }

.icw-panel {
  position: fixed;
  right: 22px;
  bottom: 242px;
  z-index: 9999;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 200px));
  display: flex;
  flex-direction: column;
  background: var(--panel, #14120D);
  border: 1px solid var(--glass-border, rgba(201,162,39,0.22));
  border-radius: var(--radius, 18px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s var(--ease, ease), transform 0.2s var(--ease, ease);
}
.icw-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.icw-header {
  padding: 14px 16px;
  background: var(--panel-2, #1B1812);
  border-bottom: 1px solid var(--slate-line, rgba(242,238,227,0.09));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.icw-header h4 {
  margin: 0;
  font-family: var(--font-display, serif);
  font-size: 1.05rem;
  color: var(--bone, #F2EEE3);
}
.icw-header p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--bone-dim, #C9C4B6);
}
.icw-close {
  background: none;
  border: none;
  color: var(--bone-dim, #C9C4B6);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.icw-close:hover { color: var(--bone, #F2EEE3); }

.icw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.icw-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.icw-msg--bot {
  align-self: flex-start;
  background: var(--panel-2, #1B1812);
  color: var(--bone, #F2EEE3);
  border: 1px solid var(--slate-line, rgba(242,238,227,0.09));
}
.icw-msg--user {
  align-self: flex-end;
  background: var(--gold, #C9A227);
  color: #14120D;
}
.icw-msg--typing { opacity: 0.6; font-style: italic; }

.icw-inputRow {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--slate-line, rgba(242,238,227,0.09));
}
.icw-input {
  flex: 1;
  background: var(--panel-2, #1B1812);
  border: 1px solid var(--slate-line, rgba(242,238,227,0.09));
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--bone, #F2EEE3);
  font-size: 0.88rem;
}
.icw-send {
  background: var(--gold, #C9A227);
  color: #14120D;
  border: none;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}
.icw-send:disabled { opacity: 0.5; cursor: default; }

.icw-note {
  padding: 8px 14px 12px;
  font-size: 0.72rem;
  color: var(--bone-dim, #C9C4B6);
  text-align: center;
}

@media (max-width: 480px) {
  /* mobile FAB stack (WhatsApp only now - Call is hidden on mobile, SMS removed) spans ~84px-132px from the bottom */
  .icw-launcher { right: 16px; bottom: 148px; width: 54px; height: 54px; }
  .icw-panel { right: 16px; left: 16px; width: auto; bottom: 212px; }
}
