/* Messenger surface inspired by the Incloudfly widget, not a WhatsApp link. */
.sfc {
    --sfc-green: #008069;
    --sfc-action: #007a64;
    --sfc-ink: #111b21;
    --sfc-muted: #52636c;
    --sfc-line: #d9e1e3;
    --sfc-danger: #a82029;
    --sfc-focus: var(--violet, #5b21b6);
    position: fixed;
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 2147483000;
    font-family: inherit;
}
.sfc[hidden], .sfc [hidden] { display: none !important; }
.sfc *, .sfc *::before, .sfc *::after { box-sizing: border-box; }
.sfc button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; font: inherit; }
.sfc__launcher { display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 4px 16px #111b2133; transition: transform 150ms ease; }
.sfc__launcher:hover { background: #1ebe5d; transform: translateY(-2px); }
.sfc__launcher-icon { display: block; width: 34px; height: 34px; }
.sfc__launcher { position: relative; }
.sfc__badge { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; width: 23px; height: 23px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #c62828; font-size: 12px; font-weight: 700; line-height: 1; }
.sfc__welcome-text { margin: 0; }
.sfc__welcome-cta { display: block; width: 100%; margin-top: 12px; padding: 10px 12px; min-height: 44px; border: 1px solid #c9d7d2; border-radius: 8px; color: #006b58; background: #f0faf5; font-weight: 700 !important; }
.sfc__welcome-cta:hover { background: #d9fdd3; }
.sfc__panel { position: fixed; right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); width: min(390px, calc(100vw - 32px)); height: 540px; max-height: calc(100dvh - 40px - env(safe-area-inset-bottom)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d9e1e3; border-radius: 18px; background: #fff; color: var(--sfc-ink); box-shadow: 0 16px 64px #111b2133; }
.sfc__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; flex-shrink: 0; background: var(--sfc-green); color: #fff; }
.sfc__identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sfc__avatar { display: block; flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; }
.sfc__avatar img { display: block; object-fit: contain; width: 100%; height: 100%; }
.sfc__heading { min-width: 0; }
.sfc__title { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.3; }
.sfc__subtitle { margin: 3px 0 0; font-size: .75rem; line-height: 1.3; }
.sfc__close { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: transparent; line-height: 1; }
.sfc__close-icon { display: block; width: 20px; height: 20px; }
.sfc__close:hover { background: #ffffff26; }
.sfc__tabs { display: flex; flex-shrink: 0; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--sfc-line); background: #f0f2f5; }
.sfc__tab { flex: 1; min-height: 36px; padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; font-size: .8rem !important; color: var(--sfc-muted); background: transparent; }
.sfc__tab:hover { background: #e4e9eb; }
.sfc__tab[aria-selected="true"] { background: #fff; color: #006b58; border-color: #c9d7d2; font-weight: 700; }
.sfc__body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background-color: #efeae2; background-image: radial-gradient(#111b2110 1px, transparent 1px); background-size: 18px 18px; }
.sfc__log { display: flex; flex-direction: column; flex: 1; min-height: 96px; gap: 10px; margin: 0; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.sfc__msg, .sfc__welcome { position: relative; max-width: 88%; margin: 0; padding: 9px 12px; border-radius: 8px; color: var(--sfc-ink); font-size: .9rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 2px #111b2114; }
.sfc__msg--bot, .sfc__welcome { align-self: flex-start; background: #fff; border-top-left-radius: 0; }
.sfc__msg--user { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 0; }
.sfc__msg::before, .sfc__welcome::before { content: ''; position: absolute; top: 0; width: 7px; height: 11px; }
.sfc__msg--bot::before, .sfc__welcome::before { left: -7px; background: linear-gradient(to bottom left, #fff 50%, transparent 50%); }
.sfc__msg--user::before { right: -7px; background: linear-gradient(to bottom right, #d9fdd3 50%, transparent 50%); }
.sfc__time { display: block; margin-top: 4px; text-align: right; color: var(--sfc-muted); font-size: .65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sfc__form { display: flex; flex-direction: column; flex-shrink: 0; }
.sfc__body[data-mode="contact"] { background: #fff; }
#sfc-panel-contact { padding: 16px; }
.sfc__field { display: flex; flex-direction: column; min-width: 0; gap: 5px; margin-bottom: 12px; }
.sfc__label { font-size: .8rem; font-weight: 600; }
.sfc__input, .sfc__textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--sfc-line); border-radius: 10px; background: #fff; color: var(--sfc-ink); font: inherit; font-size: .95rem; }
.sfc__textarea { min-height: 84px; resize: vertical; }
.sfc__composer { padding: 10px 12px 8px; background: #f0f2f5; }
.sfc__compose-row { display: flex; align-items: flex-end; gap: 8px; }
.sfc__composer .sfc__field { flex: 1; margin-bottom: 0; }
.sfc__composer .sfc__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sfc__composer .sfc__textarea { min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 22px; resize: vertical; }
.sfc__submit { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--sfc-action); color: #fff; font-weight: 700 !important; }
.sfc__submit:hover:not([disabled]) { background: #006b58; }
.sfc__send { width: 44px; height: 44px; padding: 0; flex-shrink: 0; font-size: 1.2rem !important; }
.sfc__submit[disabled] { opacity: .6; cursor: progress; }
.sfc__footer { display: flex; justify-content: flex-end; }
.sfc__counter { align-self: flex-end; margin-top: 4px; font-size: .65rem; color: var(--sfc-muted); font-variant-numeric: tabular-nums; }
.sfc__error { margin: 0; color: var(--sfc-danger); font-size: .78rem; }
.sfc__error:empty, .sfc__status:empty { display: none; }
.sfc__status { flex-shrink: 0; padding: 8px 12px; font-size: .82rem; overflow-wrap: anywhere; }
.sfc__banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--sfc-line); border-radius: 8px; background: #fff; }
.sfc__banner--error { border-color: #dfacb0; background: #fff2f2; color: var(--sfc-danger); }
.sfc__retry { min-height: 36px; padding: 4px 10px; border: 1px solid currentColor; border-radius: 8px; color: inherit; background: transparent; }
.sfc__retry:hover { background: #a820290d; }
.sfc :is(button, input, textarea, [tabindex]):focus-visible { outline: 3px solid var(--sfc-focus); outline-offset: 2px; }
.sfc__header button:focus-visible { outline-color: #fff; }
.sfc__input[aria-invalid="true"], .sfc__textarea[aria-invalid="true"] { border-color: var(--sfc-danger); }
.sfc__hp, .sfc__sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
    .sfc__panel { right: calc(10px + env(safe-area-inset-right)); left: calc(10px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); }
    .sfc__input, .sfc__textarea { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .sfc__launcher { transition: none; } .sfc__launcher:hover { transform: none; } }
