:root {
	--rdpa-ink: #0b1220;
	--rdpa-amber: #f5b700;
	--rdpa-white: #fff;
	--rdpa-soft: #f1f5f9;
	--rdpa-slate: #64748b;
	--rdpa-line: #e2e8f0;
}

.rdpa {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99990;
	font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.45;
}

.rdpa *,
.rdpa *::before,
.rdpa *::after {
	box-sizing: border-box;
}

.rdpa button,
.rdpa input {
	font: inherit;
}

.rdpa button,
.rdpa a {
	-webkit-tap-highlight-color: transparent;
}

.rdpa-launcher {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 58px;
	padding: 8px 16px 8px 8px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 18px;
	background: var(--rdpa-ink);
	color: var(--rdpa-white);
	box-shadow: 0 18px 46px rgba(11, 18, 32, 0.3);
	cursor: pointer;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.rdpa-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 22px 52px rgba(11, 18, 32, 0.38);
}

.rdpa-launcher__icon {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 13px;
	background: var(--rdpa-amber);
	color: var(--rdpa-ink);
}

.rdpa-launcher__icon svg {
	width: 24px;
	height: 24px;
}

.rdpa-launcher__text {
	display: grid;
	text-align: left;
}

.rdpa-launcher__text strong {
	font-size: 0.78rem;
	line-height: 1.2;
}

.rdpa-launcher__text small {
	margin-top: 2px;
	color: #94a3b8;
	font-size: 0.65rem;
}

.rdpa-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr) auto;
	width: min(390px, calc(100vw - 30px));
	height: min(630px, calc(100vh - 120px));
	overflow: hidden;
	border: 1px solid rgba(11, 18, 32, 0.11);
	border-radius: 24px;
	background: var(--rdpa-white);
	box-shadow: 0 28px 80px rgba(11, 18, 32, 0.3);
	transform-origin: right bottom;
	animation: rdpa-in 200ms ease both;
}

@keyframes rdpa-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
}

.rdpa-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 17px;
	background: var(--rdpa-ink);
	color: var(--rdpa-white);
}

.rdpa-brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rdpa-brand__icon {
	display: grid;
	width: 39px;
	height: 39px;
	place-items: center;
	border-radius: 12px;
	background: var(--rdpa-amber);
	color: var(--rdpa-ink);
}

.rdpa-brand__icon svg {
	width: 27px;
	height: 27px;
}

.rdpa-brand p {
	display: grid;
	margin: 0;
	line-height: 1.2;
}

.rdpa-brand strong {
	font-size: 0.88rem;
}

.rdpa-brand span {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 4px;
	color: #cbd5e1;
	font-size: 0.64rem;
}

.rdpa-brand i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #31d17c;
	box-shadow: 0 0 0 4px rgba(49, 209, 124, 0.12);
}

.rdpa-close,
.rdpa-nudge__close {
	display: grid;
	width: 32px;
	height: 32px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--rdpa-white);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.rdpa-progress {
	height: 4px;
	background: #dfe5ec;
}

.rdpa-progress span {
	display: block;
	width: 8%;
	height: 100%;
	background: var(--rdpa-amber);
	transition: width 240ms ease;
}

.rdpa-conversation {
	padding: 18px;
	overflow-y: auto;
	background:
		linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
		radial-gradient(circle at 90% 0, rgba(245, 183, 0, 0.14), transparent 34%);
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.rdpa-message {
	width: fit-content;
	max-width: 88%;
	margin-bottom: 11px;
	padding: 11px 13px;
	border-radius: 15px 15px 15px 4px;
	background: var(--rdpa-soft);
	color: #334155;
	font-size: 0.82rem;
}

.rdpa-message strong {
	color: var(--rdpa-ink);
}

.rdpa-message--user {
	margin-left: auto;
	border-radius: 15px 15px 4px;
	background: var(--rdpa-ink);
	color: var(--rdpa-white);
}

.rdpa-options {
	display: grid;
	gap: 8px;
	margin: 5px 0 16px;
}

.rdpa-option {
	display: grid;
	gap: 2px;
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--rdpa-line);
	border-radius: 12px;
	background: var(--rdpa-white);
	color: var(--rdpa-ink);
	text-align: left;
	cursor: pointer;
	transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.rdpa-option:hover {
	border-color: var(--rdpa-amber);
	background: #fffdf4;
	transform: translateX(2px);
}

.rdpa-option strong {
	font-size: 0.79rem;
}

.rdpa-option span {
	color: var(--rdpa-slate);
	font-size: 0.68rem;
}

.rdpa-measure {
	margin: 5px 0 16px;
	padding: 13px;
	border: 1px solid var(--rdpa-line);
	border-radius: 14px;
	background: var(--rdpa-white);
}

.rdpa-measure label {
	display: grid;
	gap: 6px;
}

.rdpa-measure label span {
	color: var(--rdpa-slate);
	font-size: 0.67rem;
	font-weight: 700;
}

.rdpa-measure input {
	width: 100%;
	height: 43px;
	padding: 0 11px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	color: var(--rdpa-ink);
	text-transform: uppercase;
}

.rdpa-measure > div {
	display: flex;
	gap: 7px;
	margin-top: 9px;
}

.rdpa-measure button {
	flex: 1;
	min-height: 39px;
	padding: 7px 9px;
	border: 1px solid var(--rdpa-ink);
	border-radius: 9px;
	background: var(--rdpa-ink);
	color: var(--rdpa-white);
	font-size: 0.69rem;
	font-weight: 750;
	cursor: pointer;
}

.rdpa-measure button[data-skip] {
	border-color: var(--rdpa-line);
	background: var(--rdpa-white);
	color: var(--rdpa-ink);
}

.rdpa-result {
	padding: 16px;
	border: 1px solid rgba(245, 183, 0, 0.55);
	border-radius: 16px;
	background: #fffdf4;
	color: #334155;
}

.rdpa-result__badge {
	display: inline-block;
	padding: 5px 8px;
	border-radius: 99px;
	background: var(--rdpa-amber);
	color: var(--rdpa-ink);
	font-size: 0.58rem;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rdpa-result h3 {
	margin: 11px 0 7px;
	color: var(--rdpa-ink);
	font-size: 1.08rem;
}

.rdpa-result > p {
	margin: 0 0 12px;
	font-size: 0.76rem;
	line-height: 1.55;
}

.rdpa-result dl {
	display: grid;
	gap: 5px;
	margin: 0 0 13px;
}

.rdpa-result dl div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 5px;
	border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

.rdpa-result dt,
.rdpa-result dd {
	margin: 0;
	font-size: 0.67rem;
}

.rdpa-result dt {
	color: var(--rdpa-slate);
}

.rdpa-result dd {
	color: var(--rdpa-ink);
	font-weight: 750;
	text-align: right;
}

.rdpa-result__warning {
	padding: 9px;
	border-radius: 9px;
	background: #fff;
}

.rdpa-result__actions {
	display: grid;
	gap: 7px;
}

.rdpa-result__actions a,
.rdpa-result__actions button {
	display: flex;
	min-height: 41px;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border: 1px solid var(--rdpa-ink);
	border-radius: 9px;
	background: var(--rdpa-ink);
	color: var(--rdpa-white);
	font-size: 0.7rem;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
}

.rdpa-result__actions button {
	border-color: var(--rdpa-line);
	background: var(--rdpa-white);
	color: var(--rdpa-ink);
}

.rdpa-footer {
	padding: 9px 16px;
	border-top: 1px solid var(--rdpa-line);
	background: var(--rdpa-white);
	color: var(--rdpa-slate);
	text-align: center;
}

.rdpa-footer span {
	font-size: 0.58rem;
}

.rdpa-nudge {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: 225px;
	padding: 13px 35px 13px 14px;
	border: 1px solid var(--rdpa-line);
	border-radius: 14px;
	background: var(--rdpa-white);
	box-shadow: 0 16px 38px rgba(11, 18, 32, 0.17);
	animation: rdpa-in 200ms ease both;
}

.rdpa-nudge::after {
	content: "";
	position: absolute;
	right: 26px;
	bottom: -7px;
	width: 13px;
	height: 13px;
	border-right: 1px solid var(--rdpa-line);
	border-bottom: 1px solid var(--rdpa-line);
	background: var(--rdpa-white);
	transform: rotate(45deg);
}

.rdpa-nudge strong,
.rdpa-nudge span {
	display: block;
}

.rdpa-nudge strong {
	color: var(--rdpa-ink);
	font-size: 0.75rem;
}

.rdpa-nudge span {
	margin-top: 2px;
	color: var(--rdpa-slate);
	font-size: 0.66rem;
}

.rdpa-nudge__close {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 24px;
	height: 24px;
	background: transparent;
	color: var(--rdpa-slate);
	font-size: 1rem;
}

.rdpa [hidden] {
	display: none !important;
}

.rdpa :focus-visible {
	outline: 3px solid var(--rdpa-amber);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.rdpa {
		right: 12px;
		bottom: 12px;
	}

	.rdpa-panel {
		position: fixed;
		inset: 12px;
		width: auto;
		height: auto;
		border-radius: 20px;
	}

	.rdpa.is-open .rdpa-launcher {
		display: none;
	}

	.rdpa-launcher {
		min-height: 54px;
		border-radius: 16px;
	}

	.rdpa-nudge {
		right: 0;
		bottom: 67px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rdpa *,
	.rdpa *::before,
	.rdpa *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

