/* Website visitor chat launcher + frame box (LIVE-CHAT.md "Website visitor chat"). Same look as the
   Patient Portal chat bubble (patient/assets/css/live-chat.css). Brand coral #F0584C, navy #0E2436. */
.wc-launch { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 9990; width: 58px; height: 58px; border-radius: 50%; border: 0; background: #F0584C; color: #fff; padding: 0;
    display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(240,88,76,.45);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.wc-launch svg { width: 26px; height: 26px; }
.wc-launch:focus-visible { outline: 3px solid #4C8FD0; outline-offset: 3px; }
.wc-launch.wc-pressed { transform: scale(.94); }
.wc-launch.wc-busy::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid transparent; border-top-color: #0E2436; }
@media (prefers-reduced-motion: no-preference) { .wc-launch.wc-busy::after { animation: wc-spin 1.1s linear infinite; } }
@keyframes wc-spin { to { transform: rotate(360deg); } }
.wc-dot { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: #0E2436; border: 3px solid #fff; }
.wc-dot[hidden] { display: none; }
.wc-launch.wc-hide { display: none; }

/* The chat frame: a card above the launcher on wide screens, the whole screen on phones. */
.wc-box { position: fixed; z-index: 9991; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 380px; height: min(620px, calc(100vh - 40px)); border-radius: 18px; overflow: hidden; background: #fff;
    box-shadow: 0 14px 40px rgba(14,36,54,.28); }
.wc-box[hidden] { display: none; }
.wc-box iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 640px) {
    /* Height and top follow window.visualViewport (web-chat.js) so the reply box stays above the keyboard. */
    .wc-box { right: 0; left: 0; bottom: auto; top: var(--wc-top, 0px); width: auto; height: var(--wc-vh, 100dvh); border-radius: 0; box-shadow: none; }
    html.wc-lock, html.wc-lock body { overflow: hidden !important; }
}
