/* Wilkins Management LLC — Q&A chat bubble (navy + white, matches site) */
.wm-chat {
  --wm-navy: #0b1a3a;
  --wm-navy2: #14325f;
  --wm-gold: #ffd166;
  --wm-white: #fff;
  --wm-text: #1d2433;
  --wm-muted: #4a5468;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50; /* below pay modal (z-index:100) */
  font-family: 'Montserrat', system-ui, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wm-chat--hidden {
  visibility: hidden;
  pointer-events: none;
}

.wm-chat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Toggle bubble */
.wm-chat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  background: var(--wm-navy);
  color: var(--wm-white);
  border-radius: 999px;
  padding: 14px 20px 14px 14px;
  box-shadow: 0 10px 28px rgba(11, 26, 58, 0.35);
  font: 600 0.95rem/1 Montserrat, system-ui, sans-serif;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.wm-chat-toggle:hover,
.wm-chat-toggle:focus-visible {
  background: var(--wm-navy2);
  outline: none;
  box-shadow: 0 12px 32px rgba(11, 26, 58, 0.45), 0 0 0 3px var(--wm-gold);
}
.wm-chat-toggle:focus-visible {
  outline: 2px solid var(--wm-gold);
  outline-offset: 3px;
}
.wm-chat-toggle-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wm-gold);
  color: var(--wm-navy);
  font-weight: 800;
  font-size: 1.15rem;
}
.wm-chat--open .wm-chat-toggle-label {
  display: none;
}
.wm-chat--open .wm-chat-toggle {
  padding: 12px;
  border-radius: 50%;
}
.wm-chat--open .wm-chat-toggle-icon {
  background: var(--wm-white);
  color: var(--wm-navy);
}
.wm-chat--open .wm-chat-toggle-icon::before {
  content: '×';
  font-size: 1.4rem;
  line-height: 1;
}
.wm-chat--open .wm-chat-toggle-icon {
  font-size: 0;
}

/* Panel */
.wm-chat-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 110px));
  background: var(--wm-white);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(11, 26, 58, 0.28);
  border-top: 5px solid var(--wm-navy);
  overflow: hidden;
}
.wm-chat--open .wm-chat-panel {
  display: flex;
}

.wm-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(120deg, #0b1a3a 0%, #14325f 100%);
  color: var(--wm-white);
  padding: 14px 14px 14px 18px;
}
.wm-chat-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.wm-chat-close {
  border: 0;
  background: transparent;
  color: var(--wm-gold);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.wm-chat-close:hover,
.wm-chat-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.wm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  background: #f4f6fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.wm-chat-msg {
  max-width: 92%;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--wm-text);
}
.wm-chat-msg p {
  margin: 0;
}
.wm-chat-msg--assistant {
  align-self: flex-start;
  background: var(--wm-white);
  border: 1px solid #e2e7f0;
  box-shadow: 0 2px 8px rgba(11, 26, 58, 0.06);
}
.wm-chat-msg--user {
  align-self: flex-end;
  background: var(--wm-navy);
  color: var(--wm-white);
  border-radius: 14px 14px 4px 14px;
}

.wm-chat-cta {
  display: inline-block;
  margin-top: 10px;
  border: 0;
  cursor: pointer;
  background: var(--wm-gold);
  color: var(--wm-navy);
  font: 700 0.85rem/1.2 Montserrat, system-ui, sans-serif;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(11, 26, 58, 0.15);
  transition: background 0.15s, color 0.15s;
}
.wm-chat-cta:hover,
.wm-chat-cta:focus-visible {
  background: var(--wm-navy);
  color: var(--wm-white);
  outline: none;
}

.wm-chat-chips-bar {
  flex: none;
  padding: 10px 14px 8px;
  background: #f4f6fa;
  border-top: 1px solid #e2e7f0;
  max-height: 132px;
  overflow-y: auto;
}
.wm-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.wm-chat-chip {
  border: 1.5px solid #d4dae6;
  background: var(--wm-white);
  color: var(--wm-navy);
  font: 500 0.78rem/1.3 Montserrat, system-ui, sans-serif;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.wm-chat-chip:hover,
.wm-chat-chip:focus-visible {
  border-color: var(--wm-navy);
  background: var(--wm-navy);
  color: var(--wm-white);
  outline: none;
}

.wm-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--wm-white);
  border-top: 1px solid #e2e7f0;
}
.wm-chat-input {
  flex: 1;
  min-width: 0;
  font: 500 0.92rem/1.3 Montserrat, system-ui, sans-serif;
  color: var(--wm-text);
  padding: 11px 14px;
  border: 1.5px solid #d4dae6;
  border-radius: 999px;
  background: #fbfcfe;
}
.wm-chat-input:focus {
  outline: none;
  border-color: var(--wm-navy2);
  box-shadow: 0 0 0 3px rgba(20, 50, 95, 0.15);
  background: #fff;
}
.wm-chat-send {
  flex: none;
  border: 0;
  cursor: pointer;
  background: var(--wm-navy);
  color: var(--wm-white);
  font: 700 0.88rem/1 Montserrat, system-ui, sans-serif;
  padding: 11px 16px;
  border-radius: 999px;
}
.wm-chat-send:hover,
.wm-chat-send:focus-visible {
  background: var(--wm-navy2);
  outline: 2px solid var(--wm-gold);
  outline-offset: 2px;
}

/* Mobile: full-width panel */
@media (max-width: 700px) {
  .wm-chat {
    right: 12px;
    bottom: 12px;
  }
  .wm-chat-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(88vh, 640px);
    border-radius: 18px 18px 0 0;
    bottom: 0;
  }
  .wm-chat-toggle {
    padding: 12px 16px 12px 12px;
  }
  .wm-chat-toggle-label {
    font-size: 0.88rem;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wm-chat-toggle,
  .wm-chat-cta,
  .wm-chat-chip {
    transition: none;
  }
}
