/* Appointment chatbot widget (customization 2026-11-06). All rules scoped to .cbw */
.cbw { --cbw-teal: #0f766e; --cbw-teal-d: #115e59; --cbw-bg: #f8fafc; --cbw-line: #dbe3ea; font-family: inherit; font-size: 14px; line-height: 1.4; }
.cbw *, .cbw *::before, .cbw *::after { box-sizing: border-box; }

.cbw .cbw-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 99990; background: #39f; color: #fff; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; box-shadow: 0 6px 18px rgba(15, 118, 110, .35); cursor: pointer; }
.cbw .cbw-launcher:hover, .cbw .cbw-launcher:focus { background: #087bc1; outline: none; }
.cbw.cbw-open .cbw-launcher { display: none; }

.cbw .cbw-panel { display: none; position: fixed; right: 20px; bottom: 20px; z-index: 99991; width: 380px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 40px); background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); flex-direction: column; overflow: hidden; }
.cbw.cbw-open .cbw-panel { display: flex; }

.cbw .cbw-head { background: #39f; color: #fff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; }
.cbw .cbw-title { font-weight: 600; }
.cbw .cbw-close { background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }

.cbw .cbw-log { flex: 1; overflow-y: auto; padding: 12px; background: var(--cbw-bg); }
.cbw .cbw-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; margin: 6px 0; word-wrap: break-word; white-space: pre-wrap; }
.cbw .cbw-bot { background: #fff; border: 1px solid var(--cbw-line); color: #1f2937; }
.cbw .cbw-me { background: #39f; color: #fff; margin-left: auto; }
.cbw .cbw-wait { color: #6b7280; font-style: italic; }

.cbw .cbw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.cbw .cbw-chip { background: #fff; color: #39f; border: 1px solid #39f; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.cbw .cbw-chip:hover:not(:disabled) { background: #ecfdf5; }
.cbw .cbw-chip:disabled { cursor: default; opacity: .6; }
.cbw .cbw-chip-on, .cbw .cbw-chip-on:disabled { background: #39f; color: #fff; opacity: 1; }
.cbw .cbw-chip-off, .cbw .cbw-chip-off:disabled { border-color: #cbd5e1; color: #94a3b8; background: #f1f5f9; text-decoration: line-through; opacity: 1; }
.cbw .cbw-actions .cbw-chip { border-radius: 6px; font-weight: 600; }

.cbw .cbw-link { display: inline-block; font-size: 12px; color: #39f; text-decoration: underline; margin: 0 0 8px; }

.cbw .cbw-card { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.cbw .cbw-row { display: flex; gap: 10px; padding: 2px 0; }
.cbw .cbw-k { color: #6b7280; min-width: 90px; }
.cbw .cbw-v { color: #111827; word-break: break-word; }

.cbw .cbw-result { background: #fefce8; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.cbw .cbw-result strong { display: block; margin-bottom: 4px; }
.cbw .cbw-captcha img { border-radius: 6px; margin: 4px 0; }

.cbw .cbw-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--cbw-line); background: #fff; margin: 0; }
.cbw .cbw-input input { flex: 1; border: 1px solid var(--cbw-line); border-radius: 999px; padding: 8px 14px; font-size: 14px; min-width: 0; height: auto; }
.cbw .cbw-input input:disabled { background: #f8fafc; }
.cbw .cbw-send { background: #39f; color: #fff; border: 0; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; flex: none; }

@media (max-width: 480px) {
    /* anchor to all sides (100vw would include the scrollbar and push the panel off-screen) */
    .cbw .cbw-panel { top: 0; right: 0; bottom: 0; left: 0; width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; }
    .cbw .cbw-launcher { right: 12px; bottom: 12px; }
}
