/* IntelliArch AI Assistant chat widget. Loaded on pages that set the
   assistant-api-base meta tag; assistant.js builds all markup. */
.ia-assistant-launcher {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%; cursor: pointer;
  background: #fff; border: 1px solid #dfe6ef;
  box-shadow: 0 12px 30px rgba(16, 32, 51, .28);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease; padding: 0;
}
.ia-assistant-launcher:hover { transform: translateY(-2px); }
.ia-assistant-launcher img { width: 40px; height: 40px; display: block; }
.ia-assistant-launcher:focus-visible { outline: 3px solid #27c2a4; outline-offset: 2px; }

.ia-assistant-panel {
  position: fixed; right: 18px; bottom: 88px; z-index: 901;
  width: min(400px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 110px));
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; color: #102033; border: 1px solid #dfe6ef; border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16, 32, 51, .25);
  font-family: Inter, system-ui, -apple-system, sans-serif; font-size: .95rem; line-height: 1.5;
}
.ia-assistant-panel.ia-open { display: flex; }
@media (max-width: 480px) {
  .ia-assistant-panel { right: 8px; left: 8px; width: auto; bottom: 78px; height: calc(100dvh - 96px); }
}

.ia-assistant-head {
  background: #0b1423; color: #fff; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.ia-head-logo {
  width: 34px; height: 34px; flex: none; background: #fff;
  border-radius: 9px; padding: 3px; box-sizing: border-box;
}
.ia-assistant-head .ia-title { font-weight: 700; }
.ia-assistant-head .ia-sub { font-size: .76rem; color: #b8c4d4; margin-top: 2px; }
.ia-assistant-head .ia-sub a { color: #9df2df; text-decoration: underline; }
.ia-assistant-close {
  margin-left: auto; border: 0; background: transparent; color: #b8c4d4;
  font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.ia-assistant-reset { font-size: 1.1rem; }
.ia-assistant-reset + .ia-assistant-close { margin-left: 4px; }
.ia-assistant-close:hover, .ia-assistant-close:focus-visible { color: #fff; outline: 2px solid #27c2a4; }

.ia-assistant-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ia-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: break-word; }
.ia-msg-assistant { background: #f1f4fa; border: 1px solid #e4e9f2; align-self: flex-start; border-bottom-left-radius: 4px; }
.ia-msg-user { background: #4f46e5; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ia-msg-error { background: #fdf2f2; border: 1px solid #e8b7b7; align-self: flex-start; }
.ia-msg a { color: #3229bf; text-decoration: underline; }
.ia-msg-user a { color: #dcd8ff; }

.ia-typing { align-self: flex-start; color: #607087; font-size: .85rem; padding: 2px 4px; }

.ia-actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.ia-chip {
  border: 1px solid #c8cdf5; background: #fff; color: #3229bf; cursor: pointer;
  border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .85rem; font-weight: 600;
}
.ia-chip:hover, .ia-chip:focus-visible { background: #eef0fe; outline: 2px solid #4f46e5; }
.ia-chip:disabled { opacity: .5; cursor: default; }

.ia-card {
  align-self: stretch; background: #fff; border: 1px solid #dfe6ef; border-radius: 14px; padding: 12px;
}
.ia-card h3 { margin: 0 0 8px; font-size: .95rem; }
.ia-card .ia-note { color: #607087; font-size: .8rem; margin: 6px 0 0; }
.ia-card dl { margin: 0; }
.ia-card dt { font-weight: 600; font-size: .8rem; color: #607087; margin-top: 8px; }
.ia-card dd { margin: 0; }
.ia-slot-day { font-weight: 700; font-size: .85rem; margin: 10px 0 4px; }
.ia-slot-list { display: flex; flex-wrap: wrap; gap: 6px; }

.ia-field { display: block; margin-top: 10px; }
.ia-field span { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 3px; }
.ia-field input, .ia-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #c3ccda; border-radius: 10px;
  padding: 9px 11px; font: inherit; color: inherit; background: #fff;
}
.ia-field input:focus, .ia-field textarea:focus { outline: 2px solid #4f46e5; border-color: #4f46e5; }
.ia-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: .82rem; }
.ia-consent input { margin-top: 3px; }
.ia-card .ia-error { color: #a33; font-size: .82rem; margin: 8px 0 0; }
.ia-btn {
  margin-top: 12px; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer;
  background: #4f46e5; color: #fff; font: inherit; font-weight: 700;
}
.ia-btn:hover, .ia-btn:focus-visible { background: #3229bf; outline: 2px solid #27c2a4; }
.ia-btn:disabled { opacity: .6; cursor: default; }
.ia-btn-ghost { background: transparent; color: #3229bf; border: 1px solid #c8cdf5; font-weight: 600; }
.ia-btn-ghost:hover, .ia-btn-ghost:focus-visible { background: #eef0fe; }

.ia-assistant-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #dfe6ef; background: #f7f9fc; }
.ia-assistant-form textarea {
  flex: 1; resize: none; border: 1px solid #c3ccda; border-radius: 12px; padding: 10px 12px;
  font: inherit; color: inherit; background: #fff; max-height: 110px;
}
.ia-assistant-form textarea:focus { outline: 2px solid #4f46e5; border-color: #4f46e5; }
.ia-assistant-send {
  border: 0; border-radius: 12px; padding: 0 16px; cursor: pointer;
  background: #4f46e5; color: #fff; font-weight: 700; font: inherit;
}
.ia-assistant-send:hover, .ia-assistant-send:focus-visible { background: #3229bf; outline: 2px solid #27c2a4; }
.ia-assistant-send:disabled { opacity: .6; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .ia-assistant-launcher { transition: none; }
}
