/* Rivus Tools – chat and forms. Uses the Rivus theme colours, with fallbacks for other themes. */
.rivus-ask {
	--ra-ink: var(--ink, #22479A);
	--ra-deep: var(--ink-deep, #1B2F63);
	--ra-muted: var(--ink-muted, #2A3F73);
	--ra-soft: var(--bg-soft, #F2F5FD);
	--ra-tint: var(--bg-tint, #DCE3F8);
	--ra-line: var(--line, #93A6E0);
	--ra-input: var(--line-input, #8FA2DA);
	background: var(--ra-soft);
	border: 1px solid var(--ra-line);
	border-radius: 4px;
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	color: var(--ra-ink);
	box-shadow: 0 1px 0 var(--ra-line), 0 24px 48px -32px rgba(34, 71, 154, .3);
}
.rivus-ask [hidden] { display: none !important; }
.ra-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ra-title { margin: 0; font-family: var(--font-head, inherit); font-size: 28px; font-weight: 700; color: var(--ra-ink); }
.ra-badge { font-family: var(--font-head, inherit); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ra-muted); border: 1px solid var(--ra-line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.ra-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--ra-tint); padding: 4px; border-radius: 3px; }
.ra-tab { border: 0; background: transparent; min-height: 44px; padding: 8px; border-radius: 2px; font: 600 14px var(--font-body, inherit); color: var(--ra-muted); cursor: pointer; }
.ra-tab.is-active { background: var(--ra-soft); color: var(--ra-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ra-panel { display: flex; flex-direction: column; gap: 16px; }
.ra-notice { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ra-muted); }
.ra-log { display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.ra-msg { border-radius: 4px; padding: 12px 14px; font-size: 15px; line-height: 1.6; }
.ra-user { align-self: flex-end; max-width: 88%; background: var(--ra-ink); color: #fff; white-space: pre-wrap; }
.ra-answer { background: #fff; border: 1px solid var(--ra-line); color: var(--ra-deep); }
.ra-answer p { margin: 0 0 .7em; }
.ra-answer ul { margin: 0 0 .7em; padding-left: 1.2em; }
.ra-answer a { color: var(--ra-ink); text-decoration: underline; }
.ra-answer .ra-disclaimer { margin: .8em 0 0; padding-top: .6em; border-top: 1px solid var(--ra-tint); font-size: 12px; color: var(--ra-muted); }
.ra-thinking { color: var(--ra-muted); font-style: italic; background: transparent; padding-left: 0; }
.ra-form, .ra-gate { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.ra-label { font-size: 14px; font-weight: 600; color: var(--ra-ink); }
.rivus-ask textarea, .rivus-ask input[type=email] {
	width: 100%; box-sizing: border-box; border: 1px solid var(--ra-input); background: #fff; border-radius: 2px;
	padding: 12px 14px; font: 15px/1.5 var(--font-body, inherit); color: var(--ra-deep); resize: vertical;
}
.rivus-ask textarea::placeholder { color: #5C6E99; }
.ra-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-chip { border: 1px solid var(--ra-input); background: transparent; border-radius: 999px; padding: 7px 14px; min-height: 36px; font: 13px var(--font-body, inherit); color: var(--ra-deep); cursor: pointer; text-align: left; }
.ra-chip:hover { background: #fff; }
.has-log .ra-chips, .has-log .ra-notice { display: none; }
.ra-send { width: 100%; margin-top: 4px; }
.rivus-ask .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 2px; border: 0; background: var(--ra-ink); color: #F2F5FD; font: 600 15px var(--font-body, inherit); cursor: pointer; text-decoration: none; }
.rivus-ask .btn:disabled { opacity: .6; cursor: wait; }
.ra-meta { margin: 0; font-size: 13px; color: var(--ra-muted); }
.ra-meta:empty, .ra-error:empty { display: none; }
.ra-error { margin: 0; font-size: 14px; color: #A3262A; font-weight: 600; }
.ra-gate { border-top: 1px solid var(--ra-line); padding-top: 16px; }
.ra-gate-title { margin: 0; font-size: 20px; color: var(--ra-ink); }
.ra-gate p { margin: 0; font-size: 15px; color: var(--ra-deep); }
.ra-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ra-deep); }
.ra-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.ra-consent a { color: var(--ra-ink); text-decoration: underline; }
.ra-tailored-text { margin: 0; font-size: 15px; color: var(--ra-deep); }
.ra-foot { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ra-muted); }
.ra-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) {
	.rivus-ask { padding: 20px; }
	.ra-title { font-size: 24px; }
}

/* Forms: withdrawal and order */
.rt-form-wrap { display: flex; flex-direction: column; gap: 20px; }
.rt-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; background: #F2F5FD; border: 1px solid #93A6E0; border-radius: 4px; padding: 28px; }
.rt-form[hidden] { display: none; }
.rt-form p { margin: 0; }
.rt-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #22479A; }
.rt-form input[type=text], .rt-form input[type=email], .rt-form input[type=date], .rt-form select, .rt-form textarea {
	width: 100%; box-sizing: border-box; border: 1px solid #8FA2DA; background: #fff; border-radius: 2px;
	padding: 12px 14px; font: 16px/1.5 inherit; color: #1B2F63; min-height: 48px;
}
.rt-form .btn { align-self: flex-start; }
.rt-review { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 8px 20px; margin: 0; }
.rt-review dt { font-weight: 600; color: #22479A; }
.rt-review dd { margin: 0; color: #1B2F63; }
.rt-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rt-step-note { font-weight: 600; }
.rt-done { font-size: 17px; color: #1B2F63; }
.rt-form .ra-error { color: #A3262A; font-weight: 600; }
@media (max-width: 520px) {
	.rt-form { padding: 20px; }
	.rt-review { grid-template-columns: 1fr; gap: 2px; }
	.rt-review dd { margin-bottom: 10px; }
}
