/* Component-scoped CSS. Not imported into a public release by this proposal. */
body.sv-hospital-chat-open { overflow: hidden; }
.sv-chat-drawer { box-sizing: border-box; position: fixed; inset: 0 0 0 auto; margin: 0; border: 0; border-radius: 24px 0 0 24px; padding: 0; width: min(100%, 480px); height: 100vh; height: 100dvh; max-height: 100dvh; max-width: 100vw; background: #fff; color: #202434; font: inherit; box-shadow: -14px 0 64px #17252a24; overflow: hidden; }
.sv-chat-drawer::backdrop { background: #17252a70; }
.sv-chat-drawer *, .sv-chat-drawer *::before, .sv-chat-drawer *::after { box-sizing: border-box; }
.sv-chat-drawer[open] { display: flex; flex-direction: column; }
.sv-chat-header { display: flex; align-items: flex-start; gap: 12px; padding: max(20px, env(safe-area-inset-top)) 20px 16px; border-bottom: 1px solid #e4eae8; background: #fff; flex: 0 0 auto; }
.sv-chat-identity { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1; }
.sv-chat-identity h2 { font-size: 1.13rem; line-height: 1.45; margin: 0 0 3px; overflow-wrap: anywhere; }
.sv-chat-identity p { color: #62736e; font-size: .79rem; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.sv-chat-logo { flex: 0 0 auto; width: 52px; height: 52px; object-fit: contain; border: 1px solid #e7ede9; border-radius: 14px; padding: 5px; background: #fff; }
.sv-chat-close { flex: 0 0 auto; border: 1px solid #dae5df; border-radius: 12px; background: #fff; color: #244d43; min-width: 44px; min-height: 44px; padding: 9px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.sv-chat-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px max(20px, env(safe-area-inset-bottom)); scrollbar-gutter: stable; }
.sv-chat-content > p { line-height: 1.7; }
.sv-chat-field { display: flex; flex-direction: column; gap: 7px; font-size: .88rem; margin: 0 0 12px; }
.sv-chat-field select, .sv-chat-field textarea { font: inherit; color: inherit; width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid #d1ddd7; border-radius: 12px; background: #fff; }
.sv-chat-field textarea { min-height: 96px; resize: vertical; max-height: 32dvh; font-size: 16px; line-height: 1.65; }
.sv-chat-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.sv-chat-button { display: inline-flex; align-items: center; justify-content: center; text-align: center; border: 1px solid #d0dfd7; border-radius: 11px; padding: 10px 14px; min-height: 44px; max-width: 100%; background: #fff; color: #216554; cursor: pointer; font: inherit; font-size: .86rem; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.sv-chat-primary { background: #176b57; border-color: #176b57; color: #fff; }
.sv-chat-drawer button:disabled, .sv-chat-drawer select:disabled, .sv-chat-drawer textarea:disabled { opacity: .56; cursor: default; }
.sv-chat-drawer :focus-visible { outline: 3px solid #e8a260; outline-offset: 3px; }
.sv-chat-messages { display: flex; flex-direction: column; gap: 14px; min-height: 120px; max-height: 45dvh; overflow-y: auto; overscroll-behavior: contain; padding: 3px 5px 14px; margin: 0 0 16px; }
.sv-chat-message { align-self: flex-start; max-width: 92%; padding: 12px 13px; border-radius: 16px 16px 16px 3px; background: #f0f5f3; overflow-wrap: anywhere; }
.sv-chat-message.is-self { align-self: flex-end; background: #e4f1eb; border-radius: 16px 16px 3px 16px; }
.sv-chat-message-author { display: flex; align-items: center; gap: 7px; color: #356657; font-weight: 600; font-size: .74rem; margin-bottom: 5px; line-height: 1.5; }
.sv-chat-message-logo { width: 25px; height: 25px; border: 1px solid #e3e9e5; border-radius: 7px; padding: 2px; object-fit: contain; background: #fff; flex: 0 0 auto; }
.sv-chat-message-body { margin: 0; line-height: 1.7; white-space: pre-wrap; font-size: .93rem; }
.sv-chat-message time { display: block; font-size: .66rem; margin-top: 7px; color: #73807a; line-height: 1.4; }
.sv-chat-empty { color: #6a7771; font-size: .88rem; line-height: 1.7; }
.sv-chat-compose { border-top: 1px solid #e5ece7; padding-top: 15px; }
.sv-chat-compose .sv-chat-primary { width: 100%; }
.sv-chat-help { color: #68776f; font-size: .76rem; line-height: 1.65; margin: 12px 0; }
.sv-chat-notice, .sv-chat-status { background: #f1f6f2; border-radius: 12px; padding: 12px; font-size: .85rem; line-height: 1.65; }
.sv-chat-status.is-error { background: #fff3ed; color: #8e4327; }
.sv-chat-loading { padding: 18px 0; color: #61736a; }
@media (max-width: 540px) {
  .sv-chat-drawer { width: 100%; border-radius: 0; }
  .sv-chat-header { padding-left: 16px; padding-right: 16px; }
  .sv-chat-content { padding-left: 16px; padding-right: 16px; }
  .sv-chat-messages { max-height: 40dvh; }
}
@media (prefers-reduced-motion: no-preference) {
  .sv-chat-drawer[open] { animation: sv-chat-enter .18s ease-out; }
  @keyframes sv-chat-enter { from { opacity: .5; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
}
