.public-chat-demo { color: var(--ui-text-strong); }
.public-chat-demo *, .public-chat-demo *::before, .public-chat-demo *::after { box-sizing: border-box; }
.public-chat-demo__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; max-width: 76rem; margin: auto; padding: 1rem clamp(1rem, 4vw, 2rem); }
.public-chat-demo__layout { display: grid; gap: 2rem; max-width: 76rem; margin: auto; padding: 1rem clamp(1rem, 4vw, 2rem) 3rem; }
.public-chat-demo__layout > *, .public-chat-demo__chat-header > div { min-width: 0; }
.public-chat-demo h1 { max-width: 15ch; margin: 0; font-size: clamp(1.875rem, 3.3vw, 3rem); line-height: 1.15; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
.public-chat-demo__description { max-width: 43ch; margin-top: 1rem; font-size: 1.125rem; line-height: 1.65; color: var(--ui-text-body); text-wrap: pretty; }
.public-chat-demo__disclaimer { max-width: 48ch; margin: 1.25rem 0; font-size: .875rem; line-height: 1.6; color: var(--ui-text-body); }
.public-chat-demo__summary { padding-block: 1.25rem; border-top: 1px solid var(--ui-border); border-bottom: 1px solid var(--ui-border); font-size: .875rem; line-height: 1.6; }
.public-chat-demo__summary h2 { margin: 0 0 .5rem; font-size: 1.125rem; font-weight: 650; }
.public-chat-demo__summary dl { margin: 0; }
.public-chat-demo__summary dl > div { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; padding-block: .25rem; }
.public-chat-demo__summary dt { color: var(--ui-text-body); }
.public-chat-demo__summary dd { min-width: 0; margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.public-chat-demo__pending { margin-top: .75rem; color: #92400e; }
.public-chat-demo__privacy { max-width: 52ch; margin-top: 1rem; font-size: .8125rem; line-height: 1.6; color: var(--ui-text-body); }
.public-chat-demo__chat { overflow: hidden; border: 1px solid var(--ui-border); border-radius: .75rem; background: var(--ui-surface-raised); }
.public-chat-demo__chat-header { display: flex; gap: .75rem; align-items: center; padding: 1rem; border-bottom: 1px solid var(--ui-border); }
.public-chat-demo__avatar { display: flex; flex: 0 0 2.75rem; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--ui-accent); color: white; font-weight: 700; font-size: .875rem; }
.public-chat-demo__chat-header h2 { margin: 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.public-chat-demo__chat-header p { margin: .125rem 0 0; color: var(--ui-text-body); font-size: .8125rem; overflow-wrap: anywhere; }
.public-chat-demo__messages { display: flex; flex-direction: column; gap: .875rem; height: clamp(18rem, 42dvh, 31rem); overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem 1rem; background: var(--ui-surface-subtle); }
.public-chat-demo__message { max-width: 88%; align-self: flex-start; border-radius: .625rem .625rem .625rem .125rem; background: white; padding: .7rem .875rem .4rem; font-size: .9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.public-chat-demo__message--user { align-self: flex-end; border-radius: .625rem .625rem .125rem .625rem; background: #d9f0e5; color: #173d2e; }
.public-chat-demo__message p { margin: 0; white-space: pre-wrap; }
.public-chat-demo__message time { display: block; margin-top: .2rem; color: #475569; font-size: .6875rem; text-align: right; }
.public-chat-demo__quick-replies { display: flex; flex-wrap: wrap; gap: .5rem; align-self: flex-start; max-width: 100%; }
.public-chat-demo__quick-replies[hidden] { display: none; }
.public-chat-demo__quick-replies button { min-width: 0; min-height: 2.75rem; max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.public-chat-demo__suggestions { display: flex; flex-wrap: wrap; gap: .5rem; padding: .875rem 1rem; border-top: 1px solid var(--ui-border); }
.public-chat-demo__suggestions[hidden] { display: none; }
.public-chat-demo__suggestions p { flex-basis: 100%; margin: 0; font-size: .8125rem; color: var(--ui-text-body); }
.public-chat-demo__suggestions button { min-width: 0; min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid var(--ui-border-strong); border-radius: .5rem; color: var(--ui-text-strong); background: white; font: inherit; font-size: .8125rem; line-height: 1.4; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.public-chat-demo__composer-wrap { padding: .75rem 1rem 1rem; border-top: 1px solid var(--ui-border); }
.public-chat-demo__composer { display: flex; flex-wrap: wrap; gap: .625rem; align-items: flex-end; }
.public-chat-demo__composer textarea { flex: 1 1 12rem; min-width: 0; width: 100%; max-height: 10rem; resize: vertical; border: 1px solid var(--ui-border-strong); border-radius: .5rem; background: white; padding: .625rem .75rem; font: inherit; font-size: 1rem; line-height: 1.5; }
.public-chat-demo__composer textarea::placeholder { color: #475569; opacity: 1; }
.public-chat-demo__composer input[type=submit] { min-height: 2.75rem; max-width: 100%; white-space: normal; }
.public-chat-demo__feedback:empty { display: none; }
.public-chat-demo__feedback { margin: 0 0 .75rem; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; color: var(--ui-text-body); }
.public-chat-demo__feedback.is-error { color: var(--ui-danger); }
.public-chat-demo__help { margin: .5rem 0 0; font-size: .75rem; line-height: 1.5; color: var(--ui-text-body); }
.public-chat-demo__restart { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; padding: .5rem 1rem; border-top: 1px solid var(--ui-border); }
.public-chat-demo__restart span { min-width: 0; max-width: 28ch; font-size: .75rem; line-height: 1.5; color: var(--ui-text-body); }
.public-chat-demo :is(button, textarea, a, input, [tabindex]):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
@media (min-width: 60rem) { .public-chat-demo__layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; padding-top: 2rem; } .public-chat-demo__intro { padding-top: 1rem; } }

.public-chat-demo__typing { align-self: flex-start; margin: 0; padding: .625rem .875rem; border-radius: .625rem .625rem .625rem .125rem; background: var(--ui-surface-raised); color: var(--ui-text-body); font-size: .8125rem; line-height: 1.5; }
.public-chat-demo__typing[hidden] { display: none; }
