/* Filara's site assistant (sitechat.js). The look is the Iron Rod Systems / DiscoverPro assistant, carried over; the
   colours come from Filara's own variables (site.css), so it follows light and dark with the rest of the page. */
.dpc-chat { --fg: var(--ink); --bg: var(--card); --bg-2: var(--paper-2); --accent: var(--thread); --accent-ink: #fff;
  --iron: #1F2A44; --iron-fg: #F1EDE4; --font-body: var(--sans); --font-display: var(--serif); --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; }
.dpc-chat .btn, .dpc-open.btn { display: inline-block; padding: 0.5rem 0.9rem; border-radius: 8px; border: 1px solid var(--line, #d9e0e7); background: var(--bg-2); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.dpc-chat .btn.primary, .dpc-open.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dpc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dpc-chat { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; font-family: var(--font-body); }
.dpc-bubble { display: inline-flex; align-items: center; gap: 0.55rem; background: var(--fg); color: var(--bg); border: 0; border-radius: 999px; padding: 0.55rem 1rem 0.55rem 0.55rem; font: 600 0.95rem var(--font-body); cursor: pointer; box-shadow: 0 14px 30px -14px rgba(0,0,0,0.5); transition: transform 0.25s, background 0.25s; }
.dpc-bubble:hover { transform: translateY(-2px); background: var(--accent); color: var(--accent-ink); }
.dpc-bubble-icon { width: 34px; height: 34px; border-radius: 50%; background: #1F262E; color: #E9EDF1; display: grid; place-items: center; } .dpc-bubble-icon svg { width: 26px; height: 26px; }
.dpc-chat.open .dpc-bubble-text { display: none; }
.dpc-panel[hidden] { display: none !important; }
.dpc-panel { padding: 0; margin: 0; position: absolute; right: 0; bottom: 60px; width: min(420px, calc(100vw - 32px)); height: min(680px, calc(100vh - 110px)); background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.55); display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; transition: width 0.3s cubic-bezier(.2,.8,.2,1), height 0.3s cubic-bezier(.2,.8,.2,1); animation: dpc-in 0.25s cubic-bezier(.2,.8,.2,1); }
@keyframes dpc-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dpc-chat.wide .dpc-panel { width: min(880px, calc(100vw - 32px)); height: min(880px, calc(100vh - 110px)); }
.dpc-chat.wide .dpc-msg { max-width: 76%; font-size: 1.02rem; } .dpc-chat.wide .dpc-card { max-width: 520px; } .dpc-chat.wide .dpc-log { padding: 1.2rem 1.4rem; }
.dpc-expand { background: none; border: 0; color: var(--iron-fg); cursor: pointer; padding: 0.3rem; display: grid; place-items: center; opacity: 0.85; border-radius: 6px; }
.dpc-expand:hover { opacity: 1; background: rgba(255,255,255,0.08); }
.dpc-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem; background: var(--iron); color: var(--iron-fg); }
.dpc-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; flex: 0 0 auto; } .dpc-avatar svg { width: 26px; height: 26px; color: #E9EDF1; }
.dpc-head-text { flex: 1; min-width: 0; } .dpc-head b { font-family: var(--font-display); font-size: 1rem; display: block; }
.dpc-live { display: block; font: 500 0.7rem/1.3 var(--font-mono); color: #9CC4F5; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpc-close { background: none; border: 0; color: var(--iron-fg); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.dpc-log { flex: 1; overflow-y: auto; padding: 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; min-height: 0; overflow-anchor: none; }
.dpc-msg { max-width: 92%; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.95rem; line-height: 1.5; }
.dpc-msg p { margin: 0; } .dpc-msg p + p, .dpc-msg ul, .dpc-msg ol, .dpc-msg p + h4, .dpc-msg ul + p, .dpc-msg ol + p { margin-top: 0.55rem; }
.dpc-msg ul, .dpc-msg ol { padding-left: 1.2rem; } .dpc-msg li { margin-top: 0.2rem; } .dpc-msg li::marker { color: var(--accent); }
.dpc-msg h4 { font: 650 0.95rem/1.3 var(--font-display); margin: 0.75rem 0 0.25rem; letter-spacing: 0; } .dpc-msg h4:first-child { margin-top: 0; }
.dpc-msg b { font-weight: 650; } .dpc-bot b { color: var(--fg); } .dpc-msg code { font: 0.85em var(--font-mono); background: color-mix(in srgb, var(--fg) 7%, transparent); padding: 0.05em 0.35em; border-radius: 4px; }
.dpc-msg a { color: var(--accent); text-decoration-thickness: 1px; }
.dpc-bot { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 1px 0 rgba(0,0,0,0.03); }
.dpc-body > p:first-child { font-weight: 500; }
.dpc-user { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.dpc-dots { display: inline-flex; gap: 4px; padding: 0.2rem 0; } .dpc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dpc-dot 1.2s infinite ease-in-out; } .dpc-dots i:nth-child(2) { animation-delay: 0.15s; } .dpc-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dpc-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.dpc-steps { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; } .dpc-steps span { font: 500 0.68rem var(--font-mono); letter-spacing: 0.03em; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0.1rem 0.5rem; }
.dpc-src { margin-top: 0.55rem; padding-top: 0.45rem; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.dpc-src a { font-size: 0.78rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.55rem; text-decoration: none; color: var(--accent); }
.dpc-src a img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 0.3rem; border-radius: 3px; }
.dpc-card { margin-top: 0.6rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); font-size: 0.9rem; max-width: 440px; box-shadow: 0 12px 30px -24px rgba(0,0,0,0.5); }
.dpc-card > b, .dpc-card-body b { font-family: var(--font-display); font-size: 1rem; display: block; }
.dpc-card > b { padding: 0.6rem 0.8rem 0; } .dpc-card img { display: block; width: 100%; height: auto; background: var(--iron); border-bottom: 1px solid var(--line); }
.dpc-card-body { padding: 0.7rem 0.8rem; } .dpc-card-body p { color: var(--muted); margin-top: 0.2rem; } .dpc-card-body ul { margin-top: 0.4rem; padding-left: 1.1rem; }
.dpc-card-links { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 0.8rem 0.7rem; } .dpc-card-links a { font-size: 0.8rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.6rem; text-decoration: none; color: var(--accent); }
.dpc-plans { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); padding: 0.6rem 0.8rem; }
.dpc-plan { border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.6rem; } .dpc-plan-name { font: 500 0.68rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); display: block; } .dpc-plan-price { font: 700 1.05rem var(--font-display); display: block; margin: 0.15rem 0 0.3rem; font-variant-numeric: tabular-nums; } .dpc-plan ul { padding-left: 1rem; font-size: 0.78rem; color: var(--muted); }
.dpc-card-note { padding: 0 0.8rem 0.4rem; color: var(--muted); font-size: 0.82rem; }
.dpc-contact { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem 0.8rem 0.8rem; align-items: center; } .dpc-contact a { font-size: 0.85rem; } .dpc-contact .btn { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.dpc-chips { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem 0.35rem 0.9rem; border-top: 1px solid var(--line); min-width: 0; }
.dpc-chips[hidden] { display: none; }
.dpc-chips-label { font: 500 0.66rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); flex: 0 0 auto; }
.dpc-chips-row { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 2rem; }
.dpc-chips-row::-webkit-scrollbar { display: none; }
.dpc-chip { flex: 0 0 auto; background: transparent; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 0.22rem 0.65rem; font: 500 0.8rem var(--font-body); cursor: pointer; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.dpc-chip:hover { border-color: var(--accent); color: var(--accent); }
.dpc-form { display: flex; gap: 0.45rem; padding: 0.6rem 0.8rem; border-top: 1px solid var(--line); align-items: flex-end; }
.dpc-form[hidden] { display: none; }
.dpc-form textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 10px; padding: 0.55rem 0.7rem; font: 0.95rem var(--font-body); line-height: 1.4; max-height: 120px; min-width: 0; }
.dpc-send, .dpc-mic { width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 1.1rem; cursor: pointer; flex: 0 0 auto; }
.dpc-send { background: var(--fg); color: var(--bg); } .dpc-send:disabled { opacity: 0.4; cursor: default; }
.dpc-mic { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; } .dpc-mic[hidden] { display: none; } .dpc-mic.on { color: #fff; background: #C0392B; border-color: #C0392B; animation: dpc-pulse 1s infinite; }
@keyframes dpc-pulse { 50% { box-shadow: 0 0 0 6px rgba(192,57,43,0.25); } }
.dpc-lead { display: grid; gap: 0.45rem; padding: 0.7rem 0.8rem; border-top: 1px solid var(--line); } .dpc-lead[hidden] { display: none; }
.dpc-lead-head { display: flex; justify-content: space-between; align-items: center; } .dpc-lead-head b { font-family: var(--font-display); }
.dpc-lead-x { background: none; border: 0; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.dpc-lead input, .dpc-lead textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 0.5rem 0.65rem; font: 0.92rem var(--font-body); width: 100%; }
.dpc-lead-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; } .dpc-lead-note { font-size: 0.78rem; color: var(--muted); } .dpc-lead .btn { padding: 0.5rem 0.9rem; font-size: 0.9rem; }
.dpc-lead-msg { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
.dpc-foot { display: flex; gap: 0.5rem; justify-content: center; padding: 0.4rem 0.8rem 0.6rem; font-size: 0.78rem; color: var(--muted); }
.dpc-link { color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.dpc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 520px) { .dpc-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; bottom: 0; } .dpc-chat.open .dpc-bubble { display: none; } .dpc-expand { display: none; } }
@media (prefers-reduced-motion: reduce) { .dpc-bubble, .dpc-panel { transition: none; animation: none; } .dpc-dots i, .dpc-mic.on { animation: none; } }
.dpc-panel { --dpc-surface: #FFFFFF; background: var(--dpc-surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent), 0 40px 90px -30px rgba(0,0,0,0.55), 0 10px 30px -14px rgba(0,0,0,0.35); }
.dpc-panel .dpc-log { background: color-mix(in srgb, var(--accent) 3%, var(--dpc-surface)); }
.dpc-bot { background: var(--dpc-surface); }
.dpc-form, .dpc-chips, .dpc-foot, .dpc-lead { background: var(--dpc-surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dpc-panel { --dpc-surface: #1C242E; border-color: color-mix(in srgb, #9CC4F5 40%, var(--line)); box-shadow: 0 0 0 4px rgba(156,196,245,0.12), 0 40px 90px -30px rgba(0,0,0,0.85), 0 10px 30px -14px rgba(0,0,0,0.6); } }
:root[data-theme="dark"] .dpc-panel { --dpc-surface: #1C242E; border-color: color-mix(in srgb, #9CC4F5 40%, var(--line)); box-shadow: 0 0 0 4px rgba(156,196,245,0.12), 0 40px 90px -30px rgba(0,0,0,0.85), 0 10px 30px -14px rgba(0,0,0,0.6); }
.dpc-bubble { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 14px 30px -14px rgba(0,0,0,0.6); }
.dpc-chip-more { border-style: dashed; color: var(--muted); flex: 0 0 auto; } .dpc-chip-more::before { content: "↻ "; }
.dpc-open { display: inline-block; margin-top: 0.6rem; font-size: 0.9rem; padding: 0.5rem 0.9rem; }
/* Filara touches */
.dpc-bubble-icon { background: #1F2A44; } .dpc-avatar { background: rgba(255,255,255,0.06); }
.dpc-live { color: #F09566; }
.dpc-head b { font-weight: 500; letter-spacing: -0.01em; font-size: 1.08rem; }
.dpc-panel { --dpc-surface: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dpc-panel { --dpc-surface: #1C1F2A; border-color: color-mix(in srgb, #E07B45 40%, var(--line)); box-shadow: 0 0 0 4px rgba(224,123,69,0.12), 0 40px 90px -30px rgba(0,0,0,0.85); } }
:root[data-theme="dark"] .dpc-panel { --dpc-surface: #1C1F2A; border-color: color-mix(in srgb, #E07B45 40%, var(--line)); box-shadow: 0 0 0 4px rgba(224,123,69,0.12), 0 40px 90px -30px rgba(0,0,0,0.85); }

.dpc-mic { display: grid; place-items: center; } .dpc-mic[hidden] { display: none; } .dpc-mic svg { width: 18px; height: 18px; }
.dpc-send { display: grid; place-items: center; } .dpc-send svg { width: 18px; height: 18px; }
