/* Arthur assistant widget — Insured with Chris
   Navy/gold, mobile-first, big tap targets. No external assets. */
:root {
  --arthur-navy: #102a43;
  --arthur-navy-deep: #0b1f33;
  --arthur-gold: #d9a441;
  --arthur-gold-dark: #c89334;
  --arthur-teal: #147d6c;
  --arthur-bg: #ffffff;
  --arthur-soft: #f7f9fb;
  --arthur-line: #e2e8f0;
  --arthur-text: #243b53;
  --arthur-muted: #62748a;
  --arthur-shadow: 0 18px 48px rgba(11, 31, 51, 0.28);
}

#arthur-assistant-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99990;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--arthur-text);
  font-size: 16px;
  line-height: 1.5;
}

#arthur-assistant-root * { box-sizing: border-box; }

.arthur-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  border: 2px solid var(--arthur-gold);
  border-radius: 999px;
  background: var(--arthur-navy);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--arthur-shadow);
}
.arthur-bubble:hover, .arthur-bubble:focus-visible { background: var(--arthur-navy-deep); }
.arthur-bubble .arthur-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--arthur-gold);
  box-shadow: 0 0 0 5px rgba(217, 164, 65, 0.18);
  flex: 0 0 auto;
}

.arthur-panel {
  position: fixed;
  right: 16px;
  bottom: 84px;
  width: min(430px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 104px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--arthur-bg);
  border: 1px solid var(--arthur-line);
  border-radius: 18px;
  box-shadow: var(--arthur-shadow);
}
.arthur-panel.arthur-open { display: flex; }

.arthur-header {
  background: linear-gradient(135deg, var(--arthur-navy) 0%, var(--arthur-navy-deep) 70%);
  color: #fff;
  padding: 16px 16px 14px;
}
.arthur-header-row { display: flex; align-items: flex-start; gap: 12px; }
.arthur-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--arthur-gold); color: var(--arthur-navy-deep);
  font-weight: 900; font-size: 1.1rem; flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,0.5);
  overflow: hidden;
}
.arthur-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.arthur-title { margin: 0; font-size: 1.15rem; line-height: 1.2; color: #fff; }
.arthur-subtitle { margin: 3px 0 0; color: #c9d9ea; font-size: 0.92rem; }
.arthur-close {
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent; color: #fff;
  font-size: 1.35rem; cursor: pointer; flex: 0 0 auto;
}
.arthur-lang-row { margin-top: 12px; display: flex; gap: 8px; align-items: center; }
.arthur-lang-row label { color: #e8c766; font-weight: 700; font-size: 0.9rem; }
.arthur-lang-row select {
  flex: 1 1 auto;
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 9px 10px;
  font: inherit;
  color: var(--arthur-navy-deep);
  background: #fff;
}

.arthur-body {
  overflow-y: auto;
  padding: 14px;
  background: var(--arthur-soft);
  -webkit-overflow-scrolling: touch;
}
.arthur-msg {
  background: #fff;
  border: 1px solid var(--arthur-line);
  border-radius: 14px;
  padding: 12px 13px;
  margin: 0 0 10px;
  box-shadow: 0 3px 12px rgba(16, 42, 67, 0.06);
}
.arthur-msg p { margin: 0 0 8px; }
.arthur-msg p:last-child { margin-bottom: 0; }
.arthur-msg ul, .arthur-msg ol { margin: 6px 0 8px 20px; padding: 0; }
.arthur-msg li { margin: 4px 0; }
.arthur-msg .arthur-note { color: var(--arthur-muted); font-size: 0.92rem; }
.arthur-msg strong { color: var(--arthur-navy); }

.arthur-actions { display: grid; gap: 9px; margin: 10px 0 4px; }
.arthur-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 2px solid var(--arthur-navy);
  background: #fff;
  color: var(--arthur-navy);
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.arthur-btn:hover, .arthur-btn:focus-visible { border-color: var(--arthur-teal); color: var(--arthur-teal); }
.arthur-btn.arthur-primary { background: var(--arthur-gold); border-color: var(--arthur-gold); color: var(--arthur-navy-deep); }
.arthur-btn.arthur-primary:hover, .arthur-btn.arthur-primary:focus-visible { background: var(--arthur-gold-dark); color: var(--arthur-navy-deep); }
.arthur-btn.arthur-call { background: var(--arthur-teal); border-color: var(--arthur-teal); color: #fff; }
.arthur-btn.arthur-quiet { border-color: var(--arthur-line); color: var(--arthur-muted); font-weight: 700; }

.arthur-form { display: grid; gap: 10px; margin-top: 8px; }
.arthur-form label { font-weight: 800; color: var(--arthur-navy); font-size: 0.95rem; }
.arthur-form input, .arthur-form select, .arthur-form textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  min-height: 50px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  color: var(--arthur-text);
  background: #fff;
}
.arthur-form .arthur-check { display: flex; gap: 9px; align-items: flex-start; font-weight: 600; color: var(--arthur-muted); font-size: 0.9rem; }
.arthur-form .arthur-check input { width: 22px; height: 22px; min-height: 22px; margin-top: 2px; flex: 0 0 auto; }
.arthur-form .arthur-error { color: #9b2226; font-weight: 700; }
.arthur-form .arthur-success { color: var(--arthur-teal); font-weight: 800; }

.arthur-footer-note {
  padding: 10px 14px;
  border-top: 1px solid var(--arthur-line);
  background: #fff;
  color: var(--arthur-muted);
  font-size: 0.86rem;
}

@media (max-width: 520px) {
  #arthur-assistant-root { right: 12px; bottom: 12px; }
  .arthur-panel { right: 12px; bottom: 78px; width: calc(100vw - 24px); max-height: calc(100dvh - 96px); border-radius: 16px; }
  .arthur-bubble { min-height: 54px; padding: 13px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .arthur-bubble, .arthur-btn { transition: none; }
}
