/* "Find a guide" assistant widget. Uses the site colour tokens from style.css. */
.tcw-root { position: fixed; right: 18px; bottom: 18px; z-index: 900; font-family: var(--font); }
.tcw-btn {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    background: var(--accent); color: #fff; border: 0; border-radius: 999px;
    padding: 12px 18px; font: 600 0.95rem var(--font); box-shadow: var(--shadow);
    transition: transform 0.15s, filter 0.15s;
}
.tcw-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.tcw-btn:focus-visible, .tcw-close:focus-visible, .tcw-chip:focus-visible, .tcw-go:focus-visible, .tcw-link:focus-visible, .tcw-more:focus-visible {
    outline: 3px solid var(--accent-2); outline-offset: 2px;
}
.tcw-btn-icon { font-size: 1.1rem; }
.tcw-open .tcw-btn { display: none; }
.tcw-panel {
    width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 36px));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow);
}
.tcw-panel[hidden] { display: none; }
.tcw-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tcw-title { color: var(--heading); font-size: 1rem; }
.tcw-close { background: none; border: 0; color: var(--text-muted); font: 600 0.8rem var(--font); cursor: pointer; padding: 5px 10px; border-radius: 8px; }
.tcw-close:hover { color: var(--heading); background: var(--accent-soft); }
.tcw-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.tcw-msg { max-width: 94%; font-size: 0.93rem; line-height: 1.45; }
.tcw-me { align-self: flex-end; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; }
.tcw-bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; border-radius: 14px 14px 14px 4px; }
.tcw-p { margin: 0 0 8px; }
.tcw-p:last-child { margin-bottom: 0; }
.tcw-muted { color: var(--text-muted); font-size: 0.85rem; }
.tcw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tcw-chip { cursor: pointer; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; font: 0.82rem var(--font); }
.tcw-chip:hover { border-color: var(--accent); color: var(--heading); }
.tcw-results { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tcw-result { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.tcw-result:hover { border-color: var(--accent); }
.tcw-link { color: var(--heading); font-weight: 700; text-decoration: none; }
.tcw-link:hover { color: var(--accent); text-decoration: underline; }
.tcw-where { color: var(--accent-2); font-size: 0.76rem; margin: 2px 0; }
.tcw-desc { color: var(--text-muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.tcw-more { color: var(--accent); font-size: 0.85rem; }
.tcw-form { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); }
.tcw-input { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font: 0.95rem var(--font); }
.tcw-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tcw-go { cursor: pointer; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 0 14px; font: 600 0.9rem var(--font); }
.tcw-foot { padding: 0 14px 10px; color: var(--text-muted); font-size: 0.72rem; }
.tcw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) {
    .tcw-root { right: 10px; bottom: 10px; }
    .tcw-btn-label { display: none; }
    .tcw-btn { padding: 14px; }
    .tcw-panel { max-height: calc(100vh - 20px); }
}
@media (prefers-reduced-motion: reduce) { .tcw-btn { transition: none; } }
@media print { .tcw-root { display: none; } }
