/* ServisFlow – chat na webu (Sára) */
.sf-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1100; font-family: inherit; }
.sf-chat.is-open { z-index: 1300; }
.sf-chat-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 18px 6px 6px; border: 0; border-radius: 999px; cursor: pointer;
    background: #1e3a5f; color: #fff; font: inherit; font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}
.sf-chat-toggle:hover { background: #24476f; }
.sf-chat-toggle:focus-visible, .sf-chat button:focus-visible, .sf-chat input:focus-visible, .sf-chat a:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.sf-chat-avatar { position: relative; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #e0f2fe; }
.sf-chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-chat-toggle .sf-chat-avatar::after {
    content: ""; position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px;
    border-radius: 50%; background: #22c55e; border: 2px solid #1e3a5f;
}
.sf-chat.is-open .sf-chat-toggle { display: none; }

.sf-chat-panel {
    width: 370px; max-width: calc(100vw - 24px); height: min(600px, calc(100vh - 40px));
    display: flex; flex-direction: column; background: #fff; color: #1f2937;
    border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}
.sf-chat-panel[hidden] { display: none; }
.sf-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: #1e3a5f; color: #fff; }
.sf-chat-head h2 { margin: 0; font-size: 1rem; color: #fff; }
.sf-chat-head p { margin: 2px 0 0; font-size: 0.78rem; color: #bae6fd; }
.sf-chat-close { margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
.sf-chat-close:hover { background: rgba(255, 255, 255, 0.12); }

.sf-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.sf-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 0.92rem; line-height: 1.5; }
.sf-msg p { margin: 0; }
.sf-msg p + p { margin-top: 8px; }
.sf-msg-bot { align-self: flex-start; background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.sf-msg-user { align-self: flex-end; background: #0284c7; color: #fff; border-bottom-right-radius: 4px; }
.sf-msg-links { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-msg-links a { display: inline-block; padding: 5px 10px; border-radius: 8px; background: #e0f2fe; color: #075985; font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.sf-msg-links a:hover { background: #bae6fd; }

.sf-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: #f8fafc; }
.sf-chat-chips:empty { display: none; }
.sf-chip { padding: 7px 12px; border: 1px solid #bae6fd; border-radius: 999px; background: #fff; color: #075985; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.sf-chip:hover { background: #e0f2fe; }

.sf-chat-input { display: flex; gap: 8px; padding: 12px; background: #f8fafc; border-top: 1px solid #e5e7eb; }
.sf-chat-input input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid #d1d5db; border-radius: 12px; font: inherit; font-size: 16px; background: #fff; }
.sf-chat-input button { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #0ea5e9; color: #fff; cursor: pointer; }
.sf-chat-input button:hover { background: #0284c7; }
.sf-chat-call { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; font-size: 0.85rem; font-weight: 600; color: #1e3a5f; text-decoration: none; background: #fff; border-top: 1px solid #e5e7eb; }
.sf-chat-call:hover { background: #f0f9ff; }

.sf-lead { max-width: 100%; width: 100%; }
.sf-lead-form { display: grid; gap: 8px; }
.sf-lead-form label { display: grid; gap: 3px; font-size: 0.8rem; font-weight: 600; color: #374151; }
.sf-lead-form label span { font-weight: 400; color: #6b7280; }
.sf-lead-form input { padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; font-size: 16px; }
.sf-lead-note { font-size: 0.75rem; color: #6b7280; }
.sf-lead-note a { color: #0369a1; }
.sf-lead-error { font-size: 0.82rem; color: #b91c1c; }
.sf-lead-send { padding: 11px; border: 0; border-radius: 10px; background: #0ea5e9; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sf-lead-send:disabled { opacity: 0.6; cursor: default; }
.sf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
    .sf-chat { right: 12px; bottom: 12px; }
    .sf-chat-toggle-text { display: none; }
    .sf-chat-toggle { padding: 6px; }
    .sf-chat.is-open { inset: 0; right: 0; bottom: 0; }
    .sf-chat-panel { width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; }
}
@media print { .sf-chat { display: none; } }
