/* =====================================================================
   DIA – KI-Chat-Assistentin (Diemer Remake, Screen 2a)
   ===================================================================== */
.dia-root { position: fixed; right: 24px; bottom: 24px; z-index: 99990; font-family: 'Inter', sans-serif; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.dia-root *, .dia-root *::before, .dia-root *::after { box-sizing: border-box; }

/* ---------- Launcher + Teaser ---------- */
.dia-launcher { width: 62px; height: 62px; border-radius: 50%; border: 0 !important; background: linear-gradient(135deg, #E8820C, #D07407) !important; color: #fff; font-weight: 800; font-size: 17px; font-family: 'Inter', sans-serif; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(232,130,12,.4); cursor: pointer; position: relative; transition: transform .15s; }
.dia-launcher:hover { transform: scale(1.06); }
.dia-launcher.dia-hidden { display: none; }
.dia-badge { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #E74C3C; color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
.dia-teaser { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px 14px 4px 14px; padding: 12px 16px; font-size: 13.5px; line-height: 1.3; color: #33475B; box-shadow: 0 6px 20px rgba(31,62,145,.12); max-width: 230px; cursor: pointer; }

/* ---------- Panel ---------- */
.dia-panel { display: none; width: 400px; max-width: calc(100vw - 32px); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 48px rgba(31,62,145,.22); font-size: 15px; color: #33475B; flex-direction: column; }
.dia-panel.dia-open { display: flex; }

.dia-head { background: linear-gradient(135deg, #1F3E91, #0A5BA8 160%); color: #fff; padding: 18px 20px; display: flex; gap: 12px; align-items: center; }
.dia-avatar-wrap { position: relative; flex: 0 0 auto; }
.dia-avatar { width: 42px; height: 42px; border-radius: 50%; background: #E8820C; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.dia-online { position: absolute; bottom: 0; right: 0; width: 11px; height: 11px; border-radius: 50%; background: #2ECC71; border: 2px solid #1F3E91; }
.dia-head-text { flex: 1; min-width: 0; }
.dia-head-title { font-weight: 700; font-size: 16px; }
.dia-head-sub { font-size: 12.5px; color: #B8C9D9; }
.dia-close { width: 30px; height: 30px; border-radius: 8px; border: 0 !important; display: grid; place-items: center; background: rgba(255,255,255,.12) !important; cursor: pointer; font-size: 14px; color: #fff; font-family: inherit; }
.dia-close:hover { background: rgba(255,255,255,.22); }

.dia-body { height: 470px; max-height: min(60vh, 470px); overflow-y: auto; background: #F4F7FA; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Nachrichten ---------- */
.dia-row { display: flex; gap: 10px; align-items: flex-end; }
.dia-mini { width: 28px; height: 28px; border-radius: 50%; background: #1F3E91; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: 0 0 auto; }
.dia-bubble { padding: 12px 15px; font-size: 14px; line-height: 1.3; }
.dia-bot-bubble { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px 14px 14px 4px; max-width: 280px; }
.dia-user-row { display: flex; justify-content: flex-end; }
.dia-user-bubble { background: #0A5BA8; color: #fff; border-radius: 14px 14px 4px 14px; max-width: 270px; }
.dia-dots { color: #8FA3B5; font-size: 12px; letter-spacing: 2px; padding: 14px 16px; }

/* ---------- Chips ---------- */
.dia-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 0 38px; }
.dia-chip { background: #fff !important; border: 1.5px solid #0A5BA8 !important; color: #0A5BA8 !important; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 99px; cursor: pointer; font-family: 'Inter', sans-serif; transition: background .15s, color .15s; }
.dia-chip:hover { background: #0A5BA8 !important; color: #fff !important; }

/* ---------- Lead-Formular ---------- */
.dia-leadform { margin: -4px 0 0 38px; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 14px; display: grid; gap: 9px; max-width: 280px; }
.dia-leadform input { border: 1px solid #D4DEE7; border-radius: 8px; padding: 11px 12px; font-size: 13.5px; font-family: 'Inter', sans-serif; color: #33475B; }
.dia-leadform input::placeholder { color: #8FA3B5; }
.dia-leadform input:focus { border-color: #0A5BA8; outline: none; }
.dia-leadform button { background: #E8820C !important; color: #fff !important; border: 0 !important; font-weight: 700; font-size: 14px; padding: 12px; border-radius: 9px; cursor: pointer; font-family: 'Inter', sans-serif; }
.dia-leadform button:hover { background: #D07407 !important; }
.dia-leadform button:disabled { opacity: .7; cursor: default; }
.dia-error { font-size: 12.5px; color: #D0342C; }

/* ---------- Eingabe + Fußnote ---------- */
.dia-input { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid #E2E8F0; background: #fff; }
.dia-input input { flex: 1; min-width: 0; border: 1px solid #D4DEE7; border-radius: 10px; padding: 12px 14px; font-size: 14px; font-family: 'Inter', sans-serif; color: #33475B; }
.dia-input input::placeholder { color: #8FA3B5; }
.dia-input input:focus { border-color: #0A5BA8; outline: none; }
.dia-input button { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; background: #E8820C !important; color: #fff !important; border: 0 !important; font-size: 16px; cursor: pointer; }
.dia-input button:hover { background: #D07407 !important; }
.dia-note { text-align: center; font-size: 11px; color: #8FA3B5; padding: 0 10px 10px; background: #fff; }
.dia-note a { color: #8FA3B5; text-decoration: underline; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
  .dia-root { right: 12px; bottom: 88px; } /* über der Sticky-CTA-Leiste */
  .dia-panel { width: calc(100vw - 24px); }
  .dia-body { height: auto; max-height: 55vh; }
  .dia-teaser { display: none; }
  .dia-launcher { width: 54px; height: 54px; font-size: 15px; }
}
