.wua-budget-modal[hidden],
.wua-budget-view[hidden],
.wua-budget-form-error[hidden],
.wua-budget-summary[hidden],
.wua-budget-download-status[hidden] {
	display: none !important;
}

.wua-budget-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(16, 31, 43, 0.62);
	backdrop-filter: blur(2px);
}

.wua-budget-modal__dialog {
	position: relative;
	width: min(100%, 590px);
	max-height: min(90vh, 780px);
	overflow-y: auto;
	padding: 32px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
	color: #1f2933;
}

.wua-budget-modal__dialog h2 {
	margin: 0 36px 10px 0;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	line-height: 1.2;
	color: #1f2933;
}

.wua-budget-modal__dialog p {
	margin: 0 0 20px;
	line-height: 1.55;
	color: #52616d;
}

.wua-budget-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f4f6;
	color: #36454f;
	font-size: 27px;
	line-height: 1;
	cursor: pointer;
}

.wua-budget-modal__close:hover,
.wua-budget-modal__close:focus-visible {
	background: #e4e9ed;
	outline: 2px solid #29773d;
	outline-offset: 2px;
}

.wua-budget-eyebrow {
	margin-bottom: 7px !important;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #0879a8 !important;
}

.wua-budget-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.wua-budget-modal form > label,
.wua-budget-form-grid label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: #303d47;
}

.wua-budget-field-label {
	display: inline-flex;
	align-items: baseline;
	align-self: flex-start;
	gap: 0.22em;
	max-width: 100%;
	line-height: 1.35;
	white-space: nowrap;
}

.wua-budget-required {
	flex: 0 0 auto;
	color: #b42318;
	font-size: 0.9em;
	font-weight: 750;
}

.wua-budget-form-grid input,
.wua-budget-modal form > label input:not([type="checkbox"]) {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #c8d2da;
	border-radius: 9px;
	background: #fff;
	box-sizing: border-box;
	font: inherit;
}

.wua-budget-form-grid input:focus,
.wua-budget-modal form > label input:focus {
	border-color: #29773d;
	box-shadow: 0 0 0 3px rgba(0, 159, 227, 0.13);
	outline: none;
}

.wua-budget-form-grid small {
	font-weight: 400;
	color: #6b7881;
}

.wua-budget-field--wide {
	grid-column: 1 / -1;
}

.wua-budget-consent {
	display: grid !important;
	grid-template-columns: auto 1fr;
	align-items: start;
	gap: 9px !important;
	margin-top: 16px !important;
	font-weight: 400 !important;
}

.wua-budget-consent input {
	margin-top: 3px;
}

.wua-budget-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	top: auto !important;
}

.wua-budget-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.wua-budget-button {
	min-height: 43px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 9px;
	font-size: 0.94rem;
	font-weight: 650;
	cursor: pointer;
}

.wua-budget-button:disabled {
	opacity: 0.65;
	cursor: wait;
}

.wua-budget-button--primary {
	background: #29773d;
	color: #fff;
}

.wua-budget-button--primary:hover:not(:disabled) {
	background: #0086c0;
}

.wua-budget-button--secondary {
	border-color: #aab8c2;
	background: #fff;
	color: #28414f;
}

.wua-budget-button--text {
	background: transparent;
	color: #52616d;
}

.wua-budget-form-error {
	margin-top: 14px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fff0f0;
	color: #a32626;
	font-size: 0.9rem;
}

.wua-budget-spinner {
	width: 42px;
	height: 42px;
	margin-bottom: 18px;
	border: 4px solid #dce7ed;
	border-top-color: #29773d;
	border-radius: 50%;
	animation: wua-budget-spin 0.8s linear infinite;
}

.wua-budget-success-icon {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	margin-bottom: 15px;
	border-radius: 50%;
	background: #e5f7eb;
	color: #228b45;
	font-size: 29px;
	font-weight: 800;
}

.wua-budget-summary {
	padding: 13px 15px;
	border: 1px solid #dce6eb;
	border-radius: 10px;
	background: #f7fafb;
	color: #253640;
	font-weight: 600;
}

.wua-budget-download-status {
	margin: 12px 0 0 !important;
	color: #237a3b !important;
	font-size: 0.9rem;
	font-weight: 600;
}

body.wua-budget-modal-open {
	overflow: hidden;
}

@keyframes wua-budget-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
	.wua-budget-modal {
		align-items: flex-end;
		padding: 0;
	}

	.wua-budget-modal__dialog {
		width: 100%;
		max-height: 94vh;
		padding: 27px 20px 22px;
		border-radius: 18px 18px 0 0;
	}

	.wua-budget-form-grid {
		grid-template-columns: 1fr;
	}

	.wua-budget-field--wide {
		grid-column: auto;
	}

	.wua-budget-actions,
	.wua-budget-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wua-budget-spinner {
		animation-duration: 1.8s;
	}
}
