/* OzMoneyTalks Tools — "Ask" chat helper. Loaded on every page when the helper is on,
   so it stays small and everything is scoped under .oz-chat. */

.oz-chat {
	--oz-accent: #0f766e;
	--oz-ink: #111827;
	--oz-muted: #4b5563;
	--oz-faint: #6b7280;
	--oz-line: #e5e7eb;
	--oz-soft: #f6f7f9;
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99990;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--oz-ink);
}
.oz-chat *, .oz-chat *::before, .oz-chat *::after { box-sizing: border-box; }
.oz-chat [hidden] { display: none !important; }
.oz-chat button { font: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: normal; box-shadow: none; }
.oz-chat p { margin: 0; }
.oz-chat a { color: var(--oz-accent); }
.oz-chat button:focus-visible, .oz-chat input:focus-visible, .oz-chat a:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--oz-accent) 45%, transparent); outline-offset: 2px;
}
.oz-chat__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.oz-chat__toggle {
	display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px;
	background: var(--oz-accent); color: #fff; border: 0; border-radius: 999px;
	font-weight: 600; box-shadow: 0 6px 20px rgba(17, 24, 39, .22) !important;
}
.oz-chat__toggle:hover { filter: brightness(1.08); }
.oz-chat.is-open .oz-chat__toggle { display: none; }

.oz-chat__panel {
	display: flex; flex-direction: column;
	width: 380px; max-width: calc(100vw - 32px);
	height: 560px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	background: #fff; border: 1px solid var(--oz-line); border-radius: 14px; overflow: hidden;
	box-shadow: 0 12px 40px rgba(17, 24, 39, .22);
}

.oz-chat__head {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
	padding: 14px 12px 12px 16px; background: var(--oz-accent); color: #fff;
}
.oz-chat .oz-chat__title { margin: 0; padding: 0; font-size: 16px; line-height: 1.3; font-weight: 700; color: inherit; font-family: inherit; }
.oz-chat__sub { font-size: 13px; opacity: .85; }
.oz-chat__close {
	flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
	background: transparent; color: inherit; border: 0; border-radius: 8px;
}
.oz-chat__close:hover { background: rgba(255, 255, 255, .15); }

.oz-chat__log { flex: 1; overflow-y: auto; padding: 14px; background: var(--oz-soft); display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }

.oz-chat__msg { max-width: 92%; padding: 10px 12px; border-radius: 12px; word-wrap: break-word; }
.oz-chat__msg p + p, .oz-chat__msg p + ul, .oz-chat__msg ul + p { margin-top: 8px; }
.oz-chat__msg--user { align-self: flex-end; background: var(--oz-accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.oz-chat__msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--oz-line); border-bottom-left-radius: 4px; }
.oz-chat__notice { background: #fffbeb; border-left: 3px solid #b45309; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: #78350f; }
.oz-chat__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--oz-faint); }
.oz-chat__links { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.oz-chat__links li { margin: 0; padding: 0; }
.oz-chat__links a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.oz-chat__links span { display: block; font-size: 13.5px; color: var(--oz-muted); }
.oz-chat__more { font-weight: 600; }

.oz-chat__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oz-chat__chip {
	background: #fff; color: var(--oz-ink); border: 1px solid #cbd0d8; border-radius: 999px;
	padding: 6px 12px; font-size: 13.5px; min-height: 34px; text-align: left;
}
.oz-chat__chip:hover { border-color: var(--oz-accent); color: var(--oz-accent); }

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

.oz-chat__form { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid var(--oz-line); background: #fff; }
.oz-chat .oz-chat__form input {
	flex: 1; min-width: 0; min-height: 44px; margin: 0; padding: 8px 12px; font: inherit; font-size: 16px; /* 16px stops iOS zooming */
	color: var(--oz-ink); background: #fff; border: 1px solid #cbd0d8; border-radius: 10px; box-shadow: none;
}
.oz-chat .oz-chat__form input:focus { border-color: var(--oz-accent); }
.oz-chat__send {
	flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
	background: var(--oz-accent); color: #fff; border: 0; border-radius: 10px;
}
.oz-chat__send:disabled { opacity: .5; cursor: default; }
.oz-chat__fine { padding: 0 12px 10px; background: #fff; font-size: 11.5px; color: var(--oz-faint); }
.oz-chat__fine a { color: inherit; }

/* Phones: the open panel fills the screen. */
@media (max-width: 480px) {
	.oz-chat.is-open { inset: 0; }
	.oz-chat.is-open .oz-chat__panel { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; border: 0; }
}

@media print { .oz-chat { display: none !important; } }
