.ubm-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.ubm-modal {
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	width: 95%;
	max-width: 400px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
	transform: scale(0.97);
	opacity: 0;
	transition: all 0.25s ease;
}

.ubm-theme-dark .ubm-modal {
	background: #000000;
	color: #e5e7eb;
	border: 1px solid rgba(255, 255, 255, 0.10);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.ubm-theme-light .ubm-modal {
	background: #fff;
	color: #111827;
}

.ubm-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.ubm-modal-close {
	background: transparent;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #6b7280;
}

.ubm-theme-dark .ubm-modal-close {
	color: rgba(255, 255, 255, 0.70);
}

.ubm-modal-body label {
	font-size: 0.875rem;
	color: #374151;
	margin-bottom: 6px;
	display: block;
}

.ubm-theme-dark .ubm-modal-body label {
	color: rgba(255, 255, 255, 0.75);
}

.ubm-input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	font-size: 1rem;
}

.ubm-theme-dark .ubm-input {
	background: rgba(0, 0, 0, 0.55);
	border-color: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.ubm-theme-dark .ubm-input::placeholder {
	color: rgba(255, 255, 255, 0.55);
}

.ubm-input.invalid {
	border-color: #ef476f;
	background: #fff5f7;
}

.ubm-theme-dark .ubm-input.invalid {
	background: rgba(239, 71, 111, 0.18);
	color: #fff;
}

.ubm-theme-dark .ubm-input.invalid::placeholder {
	color: rgba(255, 255, 255, 0.65);
}

.ubm-theme-dark .ubm-input:-webkit-autofill,
.ubm-theme-dark .ubm-input:-webkit-autofill:hover,
.ubm-theme-dark .ubm-input:-webkit-autofill:focus,
.ubm-theme-dark .ubm-input:-webkit-autofill:active {
	-webkit-text-fill-color: #fff;
	box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.28) inset;
	transition: background-color 9999s ease-out 0s;
}

.ubm-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
}

.ubm-btn-secondary {
	background: #f3f4f6;
	color: #374151;
}

.ubm-theme-dark .ubm-btn-secondary {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(255, 255, 255, 0.10);
}

.ubm-modal-overlay.active {
	display: flex;
}

.ubm-modal-overlay.active .ubm-modal {
	transform: scale(1);
	opacity: 1;
}

.ubm-button.ubm-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.75;
}

.ubm-button.ubm-loading::after {
	content: '';
	width: 16px;
	height: 16px;
	border-radius: 999px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: rgba(255, 255, 255, 0.95);
	display: inline-block;
	margin-left: 10px;
	animation: ubmBtnSpin 0.9s linear infinite;
}

@keyframes ubmBtnSpin {
	to { transform: rotate( 360deg ); }
}

.ubm-success-modal {
	max-width: 520px;
	padding: 26px 22px;
	text-align: center;
	background: #ffffff;
	color: #111827;
	border: 1px solid rgba(17, 24, 39, 0.10);
}

.ubm-theme-dark .ubm-success-modal {
	background: #ffffff;
	color: #111827;
}

.ubm-success-icon {
	width: 78px;
	height: 78px;
	border-radius: 999px;
	background: rgba(22, 163, 74, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 14px;
}

.ubm-success-title {
	font-size: 22px;
	font-weight: 800;
}

.ubm-success-subtitle {
	margin-top: 8px;
	font-size: 15px;
	color: #6b7280;
}

.ubm-success-actions {
	margin-top: 18px;
}

.ubm-success-actions .ubm-button {
	width: 100%;
	max-width: 360px;
	justify-content: center;
}

.ubm-error {
	color: #ef476f;
	font-size: 0.85rem;
	margin-top: 4px;
}
