/* Cross Creek chat is self-contained so it also works outside plugin page templates. */
#cgc-chat { --cgc-chat-keyboard: 0px; position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom) + var(--cgc-chat-keyboard)); z-index: 9500; color: #102d23; font: 14px/1.55 Manrope, system-ui, sans-serif; text-align: left; }
#cgc-chat, #cgc-chat * { box-sizing: border-box; }
#cgc-chat [hidden] { display: none !important; }
#cgc-chat button, #cgc-chat input { font: inherit; letter-spacing: normal; text-transform: none; margin: 0; }
#cgc-chat button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-width: 0; }
#cgc-chat svg { flex: none; }
#cgc-chat button:focus-visible, #cgc-chat a:focus-visible { outline: 3px solid #358664; outline-offset: 3px; }
#cgc-chat .cgc-chat__launcher { min-height: 56px; padding: 14px 19px; gap: 9px; border-radius: 30px; border: 1px solid #3d7159; background: #0b3b2b; color: #fff; box-shadow: 0 5px 22px #082b2038; font-weight: 700; }
#cgc-chat .cgc-chat__launcher:hover { background: #145139; }
#cgc-chat .cgc-chat__panel { position: absolute; bottom: 70px; right: 0; width: 370px; height: 550px; max-height: calc(min(100dvh, var(--cgc-chat-visible-height, 100dvh)) - 114px); display: flex; flex-direction: column; overflow: hidden; background: #f7f6f1; border: 1px solid #ccd8d0; border-radius: 22px; box-shadow: 0 18px 65px #082b203d; }
#cgc-chat .cgc-chat__header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; background: #0b3b2b; color: #fff; flex: none; }
#cgc-chat .cgc-chat__header strong { display: block; font-size: 17px; }
#cgc-chat .cgc-chat__header span { display: block; font-size: 11px; color: #d1e2d7; }
#cgc-chat .cgc-chat__close { width: 40px; height: 40px; border: 1px solid #668676; border-radius: 50%; background: #164c37; color: #fff; font-size: 25px; line-height: 1; padding: 0; }
#cgc-chat .cgc-chat__messages { flex: 1; min-height: 60px; overflow-y: auto; overscroll-behavior: contain; padding: 18px; }
#cgc-chat .cgc-chat__message { max-width: 94%; padding: 12px 14px; border-radius: 15px 15px 15px 4px; background: #fff; border: 1px solid #dae3dc; color: #213c2f; margin: 0 0 13px; white-space: pre-line; overflow-wrap: anywhere; }
#cgc-chat .cgc-chat__message--visitor { margin-left: auto; background: #0b3b2b; color: #fff; border-color: #0b3b2b; border-radius: 15px 15px 4px 15px; }
#cgc-chat .cgc-chat__sources { display: grid; gap: 8px; margin-top: 10px; }
#cgc-chat .cgc-chat__sources a { color: #126043; font-weight: 700; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
#cgc-chat .cgc-chat__suggestions { display: flex; gap: 7px; padding: 0 18px 12px; flex-wrap: wrap; }
#cgc-chat .cgc-chat__suggestions button { border: 1px solid #9bb5a5; border-radius: 18px; padding: 8px 12px; background: #fff; color: #0b3b2b; font-size: 12px; }
#cgc-chat .cgc-chat__typing { padding: 0 18px 10px; color: #426150; font-size: 12px; flex: none; }
#cgc-chat .cgc-chat__typing span { color: #2b7750; font-size: 8px; letter-spacing: 3px; margin-right: 6px; }
#cgc-chat .cgc-chat__form { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px 0; border-top: 1px solid #d6e1d9; flex: none; }
#cgc-chat .cgc-chat__form input { width: 100%; min-width: 0; height: 46px; padding: 10px 12px; background: #fff; border: 1px solid #9bb5a5; color: #102d23; border-radius: 12px; box-shadow: none; font-size: 16px; }
#cgc-chat .cgc-chat__form input::placeholder { color: #5f7368; opacity: 1; }
#cgc-chat .cgc-chat__form input:focus { outline: 2px solid #2b7750; outline-offset: 1px; }
#cgc-chat .cgc-chat__form button { flex: 0 0 46px; height: 46px; padding: 0; background: #0b3b2b; color: #fff; border: 0; border-radius: 12px; }
#cgc-chat .cgc-chat__form button:disabled { opacity: .6; cursor: wait; }
#cgc-chat .cgc-chat__note { margin: 0; padding: 9px 18px 13px; font-size: 10px; line-height: 1.5; color: #53665b; flex: none; }
#cgc-chat .cgc-chat__sr { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; }
body.cgc-classic-popup-open #cgc-chat, body.cgc-menu-open #cgc-chat { visibility: hidden; }
@media (max-width: 480px) {
 #cgc-chat { right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom) + var(--cgc-chat-keyboard)); }
 #cgc-chat .cgc-chat__panel { width: calc(100vw - 24px - env(safe-area-inset-right)); max-height: calc(min(100dvh, var(--cgc-chat-visible-height, 100dvh)) - 100px); bottom: 65px; border-radius: 18px; }
 #cgc-chat .cgc-chat__header { padding: 12px 16px; }
 #cgc-chat.is-open .cgc-chat__launcher { min-height: 48px; padding: 10px 16px; }
}
@media (max-height: 550px) {
 #cgc-chat.is-open .cgc-chat__launcher { display: none; }
 #cgc-chat .cgc-chat__panel { bottom: 0; max-height: calc(min(100dvh, var(--cgc-chat-visible-height, 100dvh)) - 24px - env(safe-area-inset-bottom)); }
 #cgc-chat .cgc-chat__note { display: none; }
}
