/* Consultant panel: site colours (Bootstrap 5 blue, navbar dark), approved concept of 2026-11-06. */
.cst-fab, .cst-panel { --cst-blue: #0d6efd; --cst-dark: #212529; --cst-soft: #f1f3f5; --cst-line: #dee2e6; --cst-muted: #6c757d; }

.cst-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 1040;
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; border-radius: 999px; padding: 12px 20px;
    background: var(--cst-blue); color: #fff; font-weight: 600; font-size: 15px;
    box-shadow: 0 6px 18px rgba(13, 110, 253, .35);
}
.cst-fab .bi { font-size: 20px; line-height: 1; }
.cst-fab:hover { background: #0b5ed7; }
.cst-fab:focus-visible { outline: 3px solid rgba(13, 110, 253, .45); outline-offset: 3px; }

.cst-panel {
    position: fixed; right: 20px; bottom: 20px; z-index: 1040;
    width: 380px; height: min(600px, calc(100vh - 40px));
    display: flex; flex-direction: column;
    background: #fff; color: #212529; border-radius: 16px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(16, 24, 40, .22), 0 0 0 1px rgba(16, 24, 40, .08);
    font-size: 14px; line-height: 1.45;
}
.cst-panel[hidden], .cst-fab[hidden] { display: none; }

.cst-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--cst-dark); color: #fff; flex: none; }
.cst-av { width: 32px; height: 32px; border-radius: 50%; background: var(--cst-blue); display: grid; place-items: center; flex: none; }
.cst-title { flex: 1; min-width: 0; }
.cst-title b { display: block; font-size: 15px; }
.cst-title small { display: block; font-size: 12px; color: #adb5bd; }
.cst-close { border: 0; background: none; color: #adb5bd; font-size: 24px; line-height: 1; padding: 0 4px; }
.cst-close:hover { color: #fff; }

.cst-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain; }
.cst-m { max-width: 88%; padding: 8px 11px; border-radius: 14px; overflow-wrap: anywhere; }
.cst-m p { margin: 0 0 6px; }
.cst-m p:last-child, .cst-m ul:last-child { margin-bottom: 0; }
.cst-m ul { margin: 4px 0 6px; padding-left: 18px; }
.cst-bot { align-self: flex-start; background: var(--cst-soft); border-bottom-left-radius: 4px; }
.cst-bot a { color: var(--cst-blue); }
.cst-me { align-self: flex-end; background: var(--cst-blue); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }

.cst-typing { display: flex; gap: 4px; padding: 12px 14px; }
.cst-typing span { width: 6px; height: 6px; border-radius: 50%; background: #adb5bd; animation: cst-dot 1s infinite ease-in-out; }
.cst-typing span:nth-child(2) { animation-delay: .15s; }
.cst-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cst-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cst-typing span { animation: none; opacity: .6; } }

.cst-form { align-self: stretch; display: grid; gap: 3px; padding: 12px; border: 1px solid var(--cst-line); border-radius: 12px; background: #fff; }
.cst-form-h { font-weight: 600; margin-bottom: 4px; }
.cst-form label { font-size: 12px; color: var(--cst-muted); margin-top: 4px; }
.cst-form input, .cst-form textarea {
    width: 100%; border: 1px solid #ced4da; border-radius: 6px; padding: 6px 9px; font: inherit; font-size: 14px; color: #212529;
}
.cst-form textarea { resize: vertical; min-height: 64px; }
.cst-form input:focus, .cst-form textarea:focus, .cst-input:focus { outline: 0; border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .2); }
.cst-err { font-size: 12px; color: #dc3545; min-height: 0; }
.cst-err:empty { display: none; }
.cst-send {
    justify-self: start; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
    border: 0; border-radius: 999px; padding: 7px 16px; background: var(--cst-blue); color: #fff; font-weight: 600; font-size: 13px;
}
.cst-send:disabled { opacity: .6; }

.cst-sent { align-self: stretch; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid #a3cfbb; border-radius: 12px; background: #e8f3ee; color: #0f5132; }
.cst-sent .bi { font-size: 18px; line-height: 1.2; }

.cst-foot { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--cst-line); flex: none; margin: 0; }
.cst-input {
    flex: 1; min-width: 0; resize: none; border: 1px solid #ced4da; border-radius: 18px;
    padding: 7px 14px; font: inherit; font-size: 14px; line-height: 1.45; max-height: 110px; overflow-y: hidden;
}
.cst-go { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--cst-blue); color: #fff; display: grid; place-items: center; }
.cst-go:disabled { background: #ced4da; }
.cst-off .cst-input { background: #e9ecef; }

/* comparison toasts sit above the button */
.has-consultant #cmp-toasts.cmp-toasts { bottom: 76px !important; }

@media (max-width: 575.98px) {
    .cst-fab { right: 16px; bottom: 16px; width: 56px; height: 56px; padding: 0; justify-content: center; }
    .cst-fab span { display: none; }
    .cst-fab .bi { font-size: 24px; }
    .cst-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; }
    body.cst-is-open { overflow: hidden; }
}
