.fc24-chat { position: fixed; inset-inline-end: 1.25rem; bottom: 1.25rem; z-index: 1050; color: var(--fc-color-text, #161a23); font-family: inherit; }
.fc24-chat button { font: inherit; border: 0; border-radius: var(--fc-radius-pill, 2rem); padding: .65rem 1rem; background: var(--fc-color-primary, #071c3f); color: var(--fc-color-surface, #fff); cursor: pointer; }
.fc24-chat button:disabled { opacity: .65; cursor: wait; }
.fc24-chat :focus-visible { outline: 3px solid var(--fc-color-focus, #2a69b8); outline-offset: 3px; }
#fc24-chat-panel { width: 25rem; max-width: 100%; max-height: calc(100dvh - 6rem); overflow-y: auto; background: var(--fc-color-surface, #fff); border: 1px solid var(--fc-color-border, #e4e8ef); border-radius: var(--fc-radius-lg, 1rem); box-shadow: var(--fc-shadow-lg, 0 12px 32px #0002); padding: 1rem; margin-top: .5rem; }
#fc24-chat-panel[hidden] { display: none; }
/* Open button is hidden while the panel is open; no gap is left above the panel. */
#fc24-chat-toggle[hidden] { display: none; }
#fc24-chat-toggle[hidden] + #fc24-chat-panel { margin-top: 0; }
#fc24-chat-panel header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
#fc24-chat-title { font-size: 1.15rem; margin: 0; }
.fc24-chat-intro, #fc24-chat-status { font-size: .875rem; margin: .75rem 0; }
#fc24-chat-messages { list-style: none; padding: 0; margin: .75rem 0; max-height: 35dvh; overflow-y: auto; overflow-wrap: anywhere; }
#fc24-chat-messages li { padding: .65rem; margin: .5rem 0; border-radius: var(--fc-radius-md, .5rem); background: var(--fc-color-surface-ice, #f2f7ff); }
#fc24-chat-messages li[data-direction="inbound"] { background: var(--fc-color-surface-muted, #f5f4f1); }
#fc24-chat-messages p { white-space: pre-wrap; margin: .25rem 0; }
#fc24-chat-messages time { display: block; font-size: .75rem; color: var(--fc-color-text-muted, #5b6472); }
#fc24-chat-form label, #fc24-chat-form textarea { display: block; width: 100%; }
#fc24-chat-body { font: inherit; box-sizing: border-box; border: 1px solid var(--fc-color-border, #e4e8ef); border-radius: var(--fc-radius-sm, .25rem); padding: .5rem; margin: .35rem 0 .6rem; resize: vertical; color: inherit; background: var(--fc-color-surface, #fff); }
/* Narrow screens: the open panel spans the viewport between both .5rem insets. The fixed box excludes a classic
   scrollbar; the former calc(100vw - 1rem) did not and put the panel 7px past the left edge at 390px. */
@media (max-width: 480px) { .fc24-chat { inset-inline-end: .5rem; bottom: .5rem; } .fc24-chat:has(> #fc24-chat-panel:not([hidden])) { inset-inline-start: .5rem; } #fc24-chat-panel { width: auto; } }

/* Reserve the rendered chat height and bottom offset without moving the chat.
   Lift the existing scroll controls together, including the mobile safe area. */
body:has(#fc24-chat) :is(.fc-scroll-buttons, #back-top) {
    bottom: calc(var(--fc24-chat-clearance, 5rem) + 16px + env(safe-area-inset-bottom, 0px));
}
/* Keep scroll visibility classes intact so closing restores the current state. */
body:has(#fc24-chat-toggle[aria-expanded="true"]) :is(.fc-scroll-buttons, #back-top) {
    display: none;
}

#fc24-chat-files { display: block; width: 100%; min-width: 0; font: inherit; }
/* Availability: a quiet status line, not a call to action. */
.fc24-chat-presence { display: flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; margin: .6rem 0 0; color: var(--fc-color-text-muted, #5b6472); }
.fc24-chat-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #9aa3b0; flex-shrink: 0; }
.fc24-chat-presence[data-online="1"] { color: #17643a; }
.fc24-chat-presence[data-online="1"] .fc24-chat-dot { background: #22a35a; box-shadow: 0 0 0 3px #22a35a33; }
#fc24-chat-email { display: block; width: 100%; box-sizing: border-box; font: inherit; border: 1px solid var(--fc-color-border, #e4e8ef); border-radius: var(--fc-radius-sm, .25rem); padding: .5rem; margin: .35rem 0 0; color: inherit; background: var(--fc-color-surface, #fff); }
#fc24-chat-email + .fc24-chat-intro { margin-top: .35rem; }
.fc24-chat-offline { font-size: .875rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--fc-color-border, #e4e8ef); }
.fc24-chat-offline[hidden] { display: none; }
.fc24-chat-offline p { margin: .35rem 0; }
.fc24-chat-booking { display: inline-block; padding: .55rem 1rem; border: 1px solid var(--fc-color-primary, #071c3f); border-radius: var(--fc-radius-pill, 2rem); color: var(--fc-color-primary, #071c3f); text-decoration: none; font-weight: 600; }
.fc24-chat-booking:hover { background: var(--fc-color-surface-ice, #f2f7ff); }
.fc24-attachments { margin: .5rem 0; padding-inline-start: 1.25rem; overflow-wrap: anywhere; }
.fc24-attachments a { display: inline-block; padding-block: .35rem; }
.fc24-chat-translation { font-size: .875rem; overflow-wrap: anywhere; }
.fc24-chat-translation summary { cursor: pointer; padding-block: .35rem; }
.fc24-chat-translation-notice { color: var(--fc-color-text-muted, #5b6472); }
