/* DKHL Chatbot Manager v0.3.2: preserve native Contact interactions; retain measured alignment. */
.dkhlcm,.dkhlcm * { box-sizing: border-box; }
.dkhlcm { --dkhlcm-navy: #152c47; --dkhlcm-blue: #1963a9; --dkhlcm-border: #dae4ee; --dkhlcm-bottom-offset: 96px; --dkhlcm-launcher-height: 58px; --dkhlcm-gold: #f0b83d; font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: 14px; line-height: 1.45; color: #23374c; }
.dkhlcm [hidden] { display: none !important; }
.dkhlcm button,.dkhlcm input,.dkhlcm select { font-family: inherit; text-transform: none; letter-spacing: normal; }
.dkhlcm button { margin: 0; box-shadow: none; background-image: none; font-size: inherit; }
.dkhlcm a { cursor: pointer; }
.dkhlcm .dkhlcm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dkhlcm button:focus-visible,.dkhlcm input:focus-visible,.dkhlcm select:focus-visible,.dkhlcm a:focus-visible,.dkhlcm-chat-body:focus-visible { outline: 3px solid #e6b13c; outline-offset: 2px; }

/* Launcher and panel are fixed overlays, never part of the page layout. */
.dkhlcm .dkhlcm-launcher { position: fixed; right: max(14px,env(safe-area-inset-right)); bottom: calc(var(--dkhlcm-bottom-offset) + env(safe-area-inset-bottom)); z-index: 9996; display: inline-flex; gap: 8px; align-items: center; justify-content: center; width: 136px; height: 58px; min-width: 0; min-height: 0; margin: 0 !important; padding: 0 13px; box-sizing: border-box !important; border: 1px solid #dfa82e; border-radius: 999px; background: var(--dkhlcm-gold); color: #142d49; font-size: 14px; font-weight: 760; line-height: 1.2; cursor: pointer; box-shadow: 0 8px 24px #152c4729; white-space: nowrap; transform: none !important; translate: none !important; float: none !important; }
.dkhlcm .dkhlcm-launcher:hover,.dkhlcm .dkhlcm-launcher:focus-visible { background: #f8c951; color: #142d49; }
.dkhlcm .dkhlcm-bot-icon { display: block; flex: 0 0 23px; width: 23px; height: 23px; color: #102f50; }
.dkhlcm .dkhlcm-launcher-label { display: block; font-size: inherit; line-height: 1.2; white-space: nowrap; }
.dkhlcm .dkhlcm-panel { position: fixed; z-index: 9997; right: max(12px,env(safe-area-inset-right)); bottom: calc(var(--dkhlcm-bottom-offset) + var(--dkhlcm-launcher-height) + 10px + env(safe-area-inset-bottom)); width: min(390px,calc(100vw - 24px)); height: min(590px,calc(100dvh - var(--dkhlcm-bottom-offset) - var(--dkhlcm-launcher-height) - 24px - env(safe-area-inset-bottom))); max-height: calc(100dvh - 20px); min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--dkhlcm-border); border-radius: 16px; background: #fff; color: #23374c; box-shadow: 0 14px 48px #07162945; isolation: isolate; }
.dkhlcm .dkhlcm-head { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; background: var(--dkhlcm-navy); color: #fff; }
.dkhlcm-head-copy { display: flex; flex-direction: column; min-width: 0; gap: 3px; line-height: 1.3; }
.dkhlcm-head-copy strong { display: block; color: #fff; font-size: 15px; font-weight: 750; }
.dkhlcm-head-copy small { display: block; color: #d8e7f5; font-size: 11px; }
.dkhlcm .dkhlcm-close { flex: 0 0 36px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 8px; color: #fff; background: transparent; font-size: 27px; line-height: 1; cursor: pointer; }
.dkhlcm .dkhlcm-close:hover,.dkhlcm .dkhlcm-close:focus-visible { color: #fff; background: #ffffff28; }

/* Exactly ONE vertical scroll area for messages, reference links and choices. */
.dkhlcm .dkhlcm-chat-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #bcc9d8 transparent; background: #fff; }
.dkhlcm .dkhlcm-messages { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; padding: 14px 12px 6px; overflow: visible; }
.dkhlcm .dkhlcm-msg { display: block; max-width: 94%; margin: 0; padding: 10px 12px; border-radius: 13px; font-size: 13px; line-height: 1.52; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.dkhlcm .dkhlcm-msg--assistant { background: #f1f5fa; border: 1px solid #e5ebf2; color: #253447; border-bottom-left-radius: 4px; }
.dkhlcm .dkhlcm-msg--user { align-self: flex-end; background: #ddecfa; color: #153b66; border-bottom-right-radius: 4px; }
.dkhlcm .dkhlcm-links { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; max-width: 100%; padding: 2px 0; }
.dkhlcm .dkhlcm-link { display: inline-flex; align-items: center; max-width: 100%; min-height: 31px; margin: 0; padding: 5px 9px; border: 1px solid #c6daee; border-radius: 7px; background: #f6fafe; color: #155f9c; font-size: 12px; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.dkhlcm .dkhlcm-link:hover { color: #0b477d; text-decoration: underline; }
.dkhlcm .dkhlcm-link::after { content: '↗'; padding-left: 5px; font-size: 12px; }
.dkhlcm .dkhlcm-choices { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(40px,auto); align-items: stretch; gap: 8px; min-height: 0; max-height: none; overflow: visible; padding: 12px; border-top: 1px solid #edf1f5; }
.dkhlcm .dkhlcm-choice { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 40px; height: auto; margin: 0; padding: 9px 8px; border: 1px solid #c6d9ea; border-radius: 9px; background: #fff; color: #20486e; font-size: 12px; font-weight: 650; line-height: 1.35; text-align: center; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.dkhlcm .dkhlcm-choice:hover,.dkhlcm .dkhlcm-choice:focus-visible { background: #eaf4fc; color: #144d7e; }
.dkhlcm .dkhlcm-choice:disabled { opacity: .6; cursor: not-allowed; }
.dkhlcm .dkhlcm-more { grid-column: 1 / -1; }
.dkhlcm .dkhlcm-message-form { display: flex; flex: 0 0 auto; align-items: stretch; gap: 7px; width: 100%; min-width: 0; padding: 10px 12px; border-top: 1px solid #eef1f5; background: #fff; margin: 0; }
.dkhlcm .dkhlcm-message-form input { flex: 1 1 auto; min-width: 0; width: auto; height: 40px; min-height: 40px; margin: 0; padding: 8px 11px; border: 1px solid #c8d4e1; border-radius: 9px; background: #fff; color: #263747; font-size: 13px; line-height: 1.25; box-shadow: none; }
.dkhlcm .dkhlcm-message-form button,.dkhlcm .dkhlcm-primary { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; height: 40px; min-height: 40px; margin: 0; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--dkhlcm-blue); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.dkhlcm .dkhlcm-message-form button:hover,.dkhlcm .dkhlcm-primary:hover { background: #114877; color: #fff; }
.dkhlcm .dkhlcm-foot { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; padding: 9px 12px 11px; border-top: 1px solid #edf1f5; background: #f9fbfd; font-size: 11px; }
.dkhlcm .dkhlcm-contact-open { min-height: 30px; height: auto; padding: 3px 0; border: 0; border-radius: 0; background: transparent; color: #135e9d; font-size: 11px; font-weight: 600; line-height: 1.4; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.dkhlcm .dkhlcm-contact-open:hover { color: #0a3b6d; background: transparent; }
.dkhlcm-foot span { color: #63768b; }

@media (max-width: 480px) {
  .dkhlcm .dkhlcm-panel { right: max(8px,env(safe-area-inset-right)); bottom: max(8px,env(safe-area-inset-bottom)); width: calc(100vw - 16px - env(safe-area-inset-right)); height: min(78dvh,600px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .dkhlcm .dkhlcm-launcher { right: max(10px,env(safe-area-inset-right)); height: 58px; min-height: 0; padding: 0 12px; font-size: 13px; }
  .dkhlcm .dkhlcm-launcher[aria-expanded="true"] { visibility: hidden; pointer-events: none; }
  .dkhlcm .dkhlcm-foot { flex-wrap: nowrap; }
  .dkhlcm .dkhlcm-foot span { text-align: right; }
}
@media (max-height: 540px) and (min-width: 481px) {
  .dkhlcm .dkhlcm-panel { bottom: 10px; height: calc(100dvh - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  .dkhlcm .dkhlcm-chat-body { scroll-behavior: auto; }
}
