/* AI-chat rechtsonder (chat.js). Huisstijl: blauw accent, witte kaart, zachte schaduw. */
.aichat { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: inherit; }
.aichat__launch { display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 15px/1 inherit; font-family: inherit; color: #fff; background: #1f6ff2;
  box-shadow: 0 8px 20px -10px rgba(31, 111, 242, .55), 0 10px 30px -14px rgba(17, 40, 80, .35); transition: transform .25s ease, background .2s, box-shadow .25s ease; }
.aichat__launch:hover { background: #1559d1; transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(31, 111, 242, .6), 0 10px 30px -14px rgba(17, 40, 80, .35); }
.aichat__launch svg { width: 22px; height: 22px; }
.aichat.is-open .aichat__launch { opacity: 0; pointer-events: none; transform: scale(.9); }
.aichat__panel { position: absolute; right: 0; bottom: 0; width: 370px; height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(17, 40, 80, .45), 0 0 0 1px rgba(17, 40, 80, .08);
  transform-origin: bottom right; animation: aichat-in .3s cubic-bezier(.2, .9, .3, 1.1); }
.aichat__panel[hidden] { display: none; }
@keyframes aichat-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.aichat__head { display: flex; align-items: center; gap: 11px; padding: 14px 14px 14px 16px; border-bottom: 1px solid #e7eaee; }
.aichat__ava { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, #0c3064, #0d8765 55%, #27c88c 80%, #0bb8cf); }
.aichat__head div { flex: 1; min-width: 0; }
.aichat__head strong { display: block; font-size: 15px; color: #0e1215; }
.aichat__head small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #128a57; font-weight: 600; }
.aichat__head small i { width: 6px; height: 6px; border-radius: 50%; background: #18b26f; }
.aichat__close { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f3f5f8; font-size: 22px; line-height: 1; color: #5d6874; cursor: pointer; }
.aichat__close:hover { background: #e7eaee; color: #0e1215; }
.aichat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; overscroll-behavior: contain; }
.aichat__msg { margin: 0; max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; animation: aichat-msg .3s ease both; }
@keyframes aichat-msg { from { opacity: 0; transform: translateY(6px); } }
.aichat__msg--ai { align-self: flex-start; background: #fff; color: #0e1215; border-bottom-left-radius: 5px; box-shadow: 0 6px 16px -12px rgba(17, 40, 80, .45); }
.aichat__msg--user { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #1f6ff2, #5b9bff); border-bottom-right-radius: 5px; }
.aichat__msg.is-error { background: #fff4e5; color: #7a4a00; }
.aichat__msg--typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 15px; background: #fff; border-bottom-left-radius: 5px; }
.aichat__msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: #a9b1bb; animation: aichat-dot 1s infinite; }
.aichat__msg--typing i:nth-child(2) { animation-delay: .15s; } .aichat__msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aichat-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.aichat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: #f7f9fc; }
.aichat__chips[hidden] { display: none; }
.aichat__chips button { border: 1px solid #cfe0fd; background: #fff; color: #1f6ff2; border-radius: 999px; padding: 7px 12px; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer; }
.aichat__chips button:hover { background: #eef4ff; }
.aichat__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid #e7eaee; }
.aichat__form textarea { flex: 1; resize: none; max-height: 120px; padding: 11px 13px; border: 1px solid #e1e5ea; border-radius: 14px; font: 14.5px/1.4 inherit; font-family: inherit; color: #0e1215; background: #fff; }
.aichat__form textarea:focus { outline: 2px solid #1f6ff2; outline-offset: 0; border-color: transparent; }
.aichat__form button { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 12px; background: #1f6ff2; color: #fff; display: grid; place-items: center; cursor: pointer; }
.aichat__form button:disabled { opacity: .5; cursor: default; }
.aichat__form button svg { width: 19px; height: 19px; }
.aichat__note { margin: 0; padding: 0 14px 12px; font-size: 11.5px; color: #8a929c; }
.aichat__note a { color: inherit; }
@media (max-width: 560px) {
  .aichat { right: 14px; bottom: 14px; }
  .aichat__launch span { display: none; }
  .aichat__launch { width: 54px; padding: 0; justify-content: center; }
  .aichat__panel { position: fixed; inset: auto 0 0 0; width: auto; height: min(78vh, 600px); border-radius: 20px 20px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .aichat__panel, .aichat__msg, .aichat__msg--typing i { animation: none; } }
