/* Marion County Local Assistant — Standalone Widget CSS */
#mc-widget-root * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, 'Segoe UI', sans-serif; }

#mc-widget-root {
  --mc-green: #1a5c2a;
  --mc-green-dark: #133f1e;
  --mc-gold: #c9922a;
  --mc-gold-light: #e8b84b;
  --mc-cream: #faf8f3;
  --mc-text: #2c2c2c;
  --mc-text-muted: #666;
  --mc-white: #fff;
  --mc-border: #e2ddd5;
  --mc-shadow: rgba(26,92,42,0.18);
}

#mc-launcher {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
  box-shadow: 0 4px 20px var(--mc-shadow), 0 2px 8px rgba(0,0,0,0.15);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 2147483647;
}
#mc-launcher:hover { transform: scale(1.05); box-shadow: 0 6px 28px var(--mc-shadow), 0 4px 12px rgba(0,0,0,0.2); }
#mc-launcher:active { transform: scale(0.97); }
#mc-pulse {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--mc-gold); opacity: 0;
  animation: mc-pulse 2.5s ease-out infinite;
}
@keyframes mc-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 0; }
}

#mc-window {
  position: fixed; bottom: 96px; right: 24px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 580px; max-height: calc(100vh - 120px);
  border-radius: 20px; background: var(--mc-white);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 8px 24px rgba(26,92,42,0.1);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--mc-border);
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
  z-index: 2147483646;
}
#mc-window.mc-hidden {
  transform: scale(0.8) translateY(16px);
  opacity: 0; pointer-events: none;
}

#mc-header {
  background: linear-gradient(135deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
  padding: 14px 16px; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#mc-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(201,146,42,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
#mc-header-text { flex: 1; min-width: 0; }
#mc-title { color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
#mc-subtitle { color: rgba(255,255,255,0.75); font-size: 10.5px; margin-top: 2px; line-height: 1.3; }
#mc-close-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.75); padding: 4px; border-radius: 6px;
  display: flex; align-items: center; transition: color 0.15s, background 0.15s;
}
#mc-close-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

#mc-messages {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth;
}
#mc-messages::-webkit-scrollbar { width: 4px; }
#mc-messages::-webkit-scrollbar-track { background: transparent; }
#mc-messages::-webkit-scrollbar-thumb { background: var(--mc-border); border-radius: 2px; }

.mc-msg { display: flex; gap: 8px; animation: mc-fadein 0.2s ease-out; }
.mc-msg.mc-user { flex-direction: row-reverse; }
@keyframes mc-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.mc-bubble {
  max-width: 82%; padding: 10px 13px; border-radius: 16px;
  font-size: 13px; line-height: 1.5; color: var(--mc-text);
}
.mc-msg.mc-bot .mc-bubble {
  background: var(--mc-cream); border: 1px solid var(--mc-border); border-bottom-left-radius: 4px;
}
.mc-msg.mc-user .mc-bubble {
  background: linear-gradient(135deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
  color: #fff; border-bottom-right-radius: 4px;
}
.mc-time { font-size: 10px; color: var(--mc-text-muted); margin-top: 3px; }
.mc-msg.mc-user .mc-time { text-align: right; }
.mc-phone-link { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; }

.mc-typing { display: flex; gap: 8px; align-items: center; animation: mc-fadein 0.2s; }
.mc-typing-bub {
  background: var(--mc-cream); border: 1px solid var(--mc-border);
  border-radius: 16px; border-bottom-left-radius: 4px;
  padding: 11px 14px; display: flex; gap: 4px; align-items: center;
}
.mc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mc-green); animation: mc-bounce 1.2s infinite; }
.mc-dot:nth-child(2) { animation-delay: 0.2s; }
.mc-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes mc-bounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

#mc-quick-replies {
  padding: 6px 14px 2px; display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0;
}
.mc-qr {
  background: var(--mc-white); border: 1.5px solid var(--mc-green); color: var(--mc-green);
  border-radius: 20px; padding: 5px 11px; font-size: 11.5px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.mc-qr:hover { background: var(--mc-green); color: #fff; }
.mc-qr:disabled { opacity: 0.5; cursor: not-allowed; }

#mc-input-area {
  padding: 10px 14px 14px; border-top: 1px solid var(--mc-border); flex-shrink: 0; background: #fff;
}
.mc-input-row { display: flex; gap: 7px; align-items: flex-end; }
#mc-input {
  flex: 1; border: 1.5px solid var(--mc-border); border-radius: 12px;
  padding: 9px 12px; font-size: 13px; resize: none; max-height: 100px; min-height: 38px;
  outline: none; line-height: 1.4; color: var(--mc-text); background: var(--mc-cream);
  transition: border-color 0.15s; font-family: inherit;
}
#mc-input:focus { border-color: var(--mc-green); background: #fff; }
#mc-input::placeholder { color: var(--mc-text-muted); }
#mc-send {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s; color: #fff;
}
#mc-send:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 3px 10px var(--mc-shadow); }
#mc-send:disabled { opacity: 0.45; cursor: not-allowed; }

#mc-disclaimer {
  font-size: 10px; color: var(--mc-text-muted); text-align: center;
  padding: 4px 14px 8px; line-height: 1.4;
}
#mc-disclaimer a { color: inherit; font-weight: 600; }

.mc-lead-form {
  background: var(--mc-cream); border: 1px solid var(--mc-border); border-radius: 12px;
  padding: 13px; display: flex; flex-direction: column; gap: 6px; max-width: 88%;
  animation: mc-fadein 0.2s;
}
.mc-lead-form.mc-success { background: #f0faf3; border-color: #2d7a42; }
.mc-lead-title { font-size: 12.5px; font-weight: 700; color: var(--mc-green); margin-bottom: 2px; }
.mc-lead-success { color: #1a5c2a; font-weight: 600; font-size: 12.5px; line-height: 1.5; }
.mc-lead-input, .mc-lead-select {
  border: 1.5px solid var(--mc-border); border-radius: 8px; padding: 7px 9px;
  font-size: 12px; font-family: inherit; outline: none; color: var(--mc-text);
  background: #fff; transition: border-color 0.15s; width: 100%;
}
.mc-lead-input:focus, .mc-lead-select:focus { border-color: var(--mc-green); }
.mc-lead-input::placeholder { color: var(--mc-text-muted); }
.mc-consent { font-size: 9.5px; color: var(--mc-text-muted); line-height: 1.4; }
.mc-lead-submit {
  background: linear-gradient(135deg, var(--mc-gold) 0%, #a97820 100%);
  color: #fff; border: none; border-radius: 8px; padding: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 1px;
}
.mc-lead-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(201,146,42,0.35); }
.mc-lead-submit:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 480px) {
  #mc-window { bottom:0; right:0; left:0; width:100%; max-width:100%; border-radius:20px 20px 0 0; height:88vh; max-height:88vh; }
  #mc-launcher { bottom:20px; right:20px; }
}
