/* Bruce Sawinski site concierge widget. Matches the main site palette. */
.cw-root {
  --cw-ink: #1B1611; --cw-cream: #F7F2E9; --cw-paper: #FFFDF9;
  --cw-brass: #B0813A; --cw-brass-br: #D9A441; --cw-line: #E2D7C5;
  --cw-muted: #7A6E60; --cw-ondark: #F4EDE1;
  --cw-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cw-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000;
  font-family: var(--cw-sans);
}
.cw-bubble {
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--cw-ink); box-shadow: 0 10px 30px rgba(27,22,17,.32);
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform .18s, background .18s;
}
.cw-bubble:hover { transform: translateY(-2px); background: #000; }
.cw-bubble img { height: 34px; width: auto; display: block; }
.cw-bubble .cw-close-ic { display: none; color: var(--cw-ondark); font-size: 26px; line-height: 1; }
.cw-root.cw-open .cw-bubble img { display: none; }
.cw-root.cw-open .cw-bubble .cw-close-ic { display: block; }

.cw-panel {
  position: absolute; right: 0; bottom: 78px; width: 376px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px);
  background: var(--cw-cream); border: 1px solid var(--cw-line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(27,22,17,.26); display: none; flex-direction: column;
  overflow: hidden;
}
.cw-root.cw-open .cw-panel { display: flex; animation: cw-in .2s ease; }
@keyframes cw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cw-head { background: var(--cw-ink); color: var(--cw-ondark); padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.cw-head img { height: 34px; width: auto; }
.cw-head .cw-title { font-family: var(--cw-serif); font-size: 1.05rem; line-height: 1.1; }
.cw-head .cw-sub { font-size: .72rem; color: var(--cw-brass-br); letter-spacing: .04em; margin-top: 2px; }

.cw-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.cw-msg { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.cw-msg.bot { background: var(--cw-paper); border: 1px solid var(--cw-line); color: #2a2319; align-self: flex-start; border-bottom-left-radius: 4px; }
.cw-msg.me { background: var(--cw-ink); color: var(--cw-ondark); align-self: flex-end; border-bottom-right-radius: 4px; }
.cw-typing { align-self: flex-start; color: var(--cw-muted); font-size: .9rem; padding: 4px 2px; }
.cw-typing span { animation: cw-blink 1.2s infinite both; } .cw-typing span:nth-child(2){animation-delay:.2s} .cw-typing span:nth-child(3){animation-delay:.4s}
@keyframes cw-blink { 0%,80%,100%{opacity:.2} 40%{opacity:1} }

.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-chip, .cw-cta {
  font-family: var(--cw-sans); cursor: pointer; border: 1px solid var(--cw-line);
  background: var(--cw-paper); color: var(--cw-ink); border-radius: 999px;
  padding: 8px 13px; font-size: .82rem; transition: border-color .15s, color .15s, background .15s;
}
.cw-chip:hover { border-color: var(--cw-brass); color: var(--cw-brass); }
.cw-cta { background: var(--cw-brass-br); border-color: var(--cw-brass-br); color: var(--cw-ink); font-weight: 600; text-decoration: none; display: inline-block; }
.cw-cta:hover { background: var(--cw-ink); border-color: var(--cw-ink); color: var(--cw-ondark); }
.cw-cta.ghost { background: transparent; color: var(--cw-ink); font-weight: 500; }
.cw-cta.ghost:hover { border-color: var(--cw-brass); color: var(--cw-brass); background: transparent; }
.cw-actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }

.cw-foot { border-top: 1px solid var(--cw-line); padding: 12px; background: var(--cw-cream); }
.cw-inrow { display: flex; gap: 8px; }
.cw-in { flex: 1; border: 1px solid var(--cw-line); border-radius: 999px; padding: 10px 14px; font-size: .9rem; font-family: var(--cw-sans); background: var(--cw-paper); color: var(--cw-ink); outline: none; }
.cw-in:focus { border-color: var(--cw-brass); }
.cw-send { border: none; background: var(--cw-ink); color: var(--cw-ondark); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 17px; flex: none; }
.cw-send:hover { background: var(--cw-brass); }
.cw-disc { text-align: center; font-size: .68rem; color: var(--cw-muted); margin-top: 8px; }

/* lead / email form */
.cw-form { background: var(--cw-paper); border: 1px solid var(--cw-line); border-radius: 14px; padding: 14px; align-self: stretch; display: grid; gap: 8px; }
.cw-form label { font-size: .74rem; color: var(--cw-muted); }
.cw-form input, .cw-form textarea { width: 100%; border: 1px solid var(--cw-line); border-radius: 8px; padding: 8px 10px; font-size: .88rem; font-family: var(--cw-sans); background: #fff; color: var(--cw-ink); }
.cw-form textarea { resize: vertical; min-height: 54px; }
.cw-form .cw-cta { text-align: center; border: none; }
.cw-ok { font-size: .9rem; color: var(--cw-ink); align-self: flex-start; background: var(--cw-paper); border: 1px solid var(--cw-line); border-radius: 14px; padding: 12px 14px; }

@media (max-width: 480px) {
  .cw-root { right: 14px; bottom: 14px; }
  .cw-panel { bottom: 72px; height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .cw-root.cw-open .cw-panel, .cw-typing span { animation: none; } }
