/* Scoped public chat styles; the native dialog supplies keyboard/modal behaviour. */
#heritage-chat{--hc-navy:#14364e;--hc-gold:#d8b652;--hc-border:#dbe4ea;--hc-muted:#536774;font:400 15px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--hc-navy)}
#heritage-chat *,#heritage-chat *::before,#heritage-chat *::after{box-sizing:border-box}
#heritage-chat [hidden]{display:none!important}
#heritage-chat button,#heritage-chat input,#heritage-chat textarea{font:inherit}
#heritage-chat button{cursor:pointer;min-height:44px;touch-action:manipulation}
#heritage-chat button:disabled{cursor:default;opacity:.6}
#heritage-chat :is(button,input,textarea,a):focus-visible{outline:3px solid #a27a12;outline-offset:3px}
#heritage-chat .hc-launcher{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:1030;border:1px solid var(--hc-navy);border-radius:28px;padding:12px 20px;color:#fff;background:var(--hc-navy);box-shadow:0 4px 18px #102b4430;font-weight:650;max-width:calc(100vw - 36px)}
#heritage-chat .hc-launcher::before{content:"";display:inline-block;width:16px;height:13px;margin-right:9px;border:1.5px solid var(--hc-gold);border-radius:5px 5px 5px 0;vertical-align:-1px}
#heritage-chat .hc-dialog{position:fixed;inset:auto max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) auto;margin:0;padding:0;border:1px solid var(--hc-border);border-radius:18px;background:#fff;color:var(--hc-navy);width:440px;max-width:calc(100vw - 36px);max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);box-shadow:0 14px 48px #102b443b;overflow:hidden}
#heritage-chat .hc-dialog[open]{display:flex;flex-direction:column}
#heritage-chat .hc-dialog::backdrop{background:#102b443d}
#heritage-chat .hc-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;background:var(--hc-navy);color:#fff;padding:14px 14px 13px 20px;border-bottom:3px solid var(--hc-gold)}
#heritage-chat .hc-header h2{font-size:18px;font-weight:650;color:#fff;margin:0;line-height:1.3}
#heritage-chat .hc-brand{min-width:0}
#heritage-chat .hc-header .hc-header-caption{color:#e0eaf0;font-size:12px;line-height:1.4;margin:4px 0 0;letter-spacing:.02em}
#heritage-chat .hc-close{display:grid;place-items:center;border:0;border-radius:6px;color:#fff;background:transparent;font-size:28px;line-height:1;width:44px;height:44px;flex:0 0 44px;padding:0}
#heritage-chat .hc-close:hover{background:#ffffff18}
#heritage-chat .hc-body{padding:20px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
#heritage-chat p{margin:0 0 12px;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
#heritage-chat h3{margin:0 0 12px;font-size:20px;line-height:1.35;font-weight:650;color:var(--hc-navy)}
#heritage-chat .hc-welcome-question{font-size:15px;line-height:1.5;color:#354e60;padding-bottom:3px}
#heritage-chat .hc-intro,#heritage-chat .hc-note{color:var(--hc-muted);font-size:13px;line-height:1.45}
#heritage-chat .hc-status:empty,#heritage-chat .hc-ticket-status:empty{display:none}
#heritage-chat .hc-status{font-size:13px;padding:9px 10px;border-radius:6px;background:#f2f6f8;color:var(--hc-navy)}
#heritage-chat .hc-error{padding:10px;border:1px solid #bf7878;border-radius:6px;background:#fff5f4;color:#8e2525;font-size:13px}
#heritage-chat .hc-form{display:flex;flex-direction:column;gap:14px;margin:0}
#heritage-chat .hc-form>p,#heritage-chat .hc-form>h3{margin-bottom:0}
#heritage-chat .hc-field{display:flex;flex-direction:column;gap:5px;min-width:0}
#heritage-chat label{font-size:14px;font-weight:600;line-height:1.4;margin:0}
#heritage-chat input:not([type=checkbox]),#heritage-chat textarea{width:100%;min-width:0;border:1px solid #aabdc9;border-radius:8px;padding:11px 12px;background:#fff;color:#183449;min-height:44px;box-shadow:none;font-size:16px;line-height:1.45}
#heritage-chat textarea{resize:vertical;max-height:160px}
#heritage-chat input#hc-code{letter-spacing:.22em;font-variant-numeric:tabular-nums;max-width:190px}
#heritage-chat .hc-checkbox{display:flex;gap:9px;align-items:flex-start;font-size:13px;font-weight:400;color:var(--hc-muted)}
#heritage-chat .hc-checkbox input{flex:0 0 auto;width:18px;height:18px;margin:1px 0 0;accent-color:var(--hc-navy)}
#heritage-chat a{color:#125574;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
#heritage-chat a:hover{color:#785b16}
#heritage-chat .hc-button{border:1px solid var(--hc-navy);border-radius:8px;padding:11px 15px;background:var(--hc-navy);color:#fff;font-size:14px;font-weight:650;white-space:normal}
#heritage-chat .hc-button:hover:enabled{background:#204e6b}
#heritage-chat .hc-secondary-button{border:1px solid #9aaebd;border-radius:8px;padding:11px 15px;background:#fff;color:var(--hc-navy);font-size:14px;font-weight:600;white-space:normal}
#heritage-chat .hc-secondary-button:hover:enabled{background:#edf3f6}
#heritage-chat .hc-text-button{background:transparent;border:0;color:#125574;text-decoration:underline;text-underline-offset:3px;padding:6px 4px;font-size:13px;white-space:normal}
#heritage-chat .hc-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
#heritage-chat .hc-greeting{font-weight:650;font-size:15px;padding-bottom:2px}
#heritage-chat .hc-transcript{max-height:40vh;max-height:40dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-width:0;border:1px solid var(--hc-border);border-radius:10px;padding:12px;background:#f4f7f9;margin-bottom:14px}
#heritage-chat .hc-transcript:empty{display:none}
#heritage-chat .hc-exchange{padding:0 0 14px;margin:0 0 14px;border:0;border-bottom:1px solid var(--hc-border)}
#heritage-chat .hc-exchange:last-child{padding-bottom:0;margin-bottom:0;border-bottom:0}
#heritage-chat .hc-speaker{font-size:11px;font-weight:700;color:var(--hc-muted);margin-bottom:5px;letter-spacing:.025em}
#heritage-chat .hc-question-text,#heritage-chat .hc-answer-text{white-space:pre-wrap;font-size:14px;line-height:1.55}
#heritage-chat .hc-question-text{background:#e5edf3;border-radius:10px 10px 3px 10px;padding:10px 12px;margin-left:18px}
#heritage-chat .hc-answer-text{background:#fff;border:1px solid #e0e7ec;border-radius:3px 10px 10px 10px;padding:11px 12px}
#heritage-chat .hc-source-heading{font-size:12px;font-weight:700;margin-bottom:3px}
#heritage-chat .hc-sources{margin:0 0 10px;padding-left:18px;font-size:13px;line-height:1.45}
#heritage-chat .hc-sources li{margin:3px 0}
#heritage-chat .hc-ticket{background:#fbf8ee;border:1px solid #e5dcb9;border-radius:9px;padding:12px;margin-top:12px}
#heritage-chat .hc-ticket-complete{background:transparent;border:0;padding:0}
#heritage-chat .hc-ticket-confirmation{padding:12px;border:1px solid #c7dbd0;border-radius:9px;background:#f1f7f3;margin-top:10px}
#heritage-chat .hc-ticket-thanks{font-size:14px;line-height:1.55;color:#234636}
#heritage-chat .hc-ticket-status{font-size:13px;margin-top:10px;margin-bottom:0}
#heritage-chat .hc-ticket-button{width:100%}
#heritage-chat .hc-followup-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
#heritage-chat .hc-followup-actions>button{flex:1 1 130px}
#heritage-chat .hc-contact-link{display:inline-block;font-size:14px;margin-bottom:10px}
#heritage-chat .hc-ask{border-top:1px solid var(--hc-border);padding-top:14px}
#heritage-chat .hc-session-actions{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:-6px}
@media(max-width:480px){#heritage-chat .hc-dialog{inset:auto 8px max(8px,env(safe-area-inset-bottom)) 8px;width:auto;max-width:none;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}#heritage-chat .hc-header{padding-left:16px}#heritage-chat .hc-body{padding:16px}#heritage-chat h3{font-size:18px}#heritage-chat .hc-transcript{padding:10px;max-height:36dvh}#heritage-chat .hc-launcher{right:12px;bottom:max(12px,env(safe-area-inset-bottom));padding:10px 16px;font-size:14px}}
@media(prefers-reduced-motion:reduce){#heritage-chat *{scroll-behavior:auto!important}}
