.ap-alert {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ap-alert[hidden] {
	display: none;
}

.ap-alert__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 18, 48, 0.62);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: ap-alert-fade 0.25s ease-out;
}

.ap-alert__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(6, 18, 48, 0.35), 0 4px 14px rgba(6, 18, 48, 0.15);
	animation: ap-alert-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.ap-alert__header {
	position: relative;
	padding: 28px 28px 22px;
	background: linear-gradient(135deg, #d92d20 0%, #f04438 55%, #f97066 100%);
	color: #fff;
	text-align: center;
	border-radius: 20px 20px 0 0;
}

.ap-alert__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08);
}

.ap-alert__icon svg {
	width: 34px;
	height: 34px;
}

.ap-alert__title {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.2px;
	color: #fff;
}

.ap-alert__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ap-alert__close:hover,
.ap-alert__close:focus-visible {
	background: rgba(255, 255, 255, 0.32);
}

.ap-alert__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ap-alert__body {
	padding: 24px 28px 8px;
	color: #1d2939;
	font-size: 16px;
	line-height: 1.6;
}

.ap-alert__body p {
	margin: 0 0 14px;
}

.ap-alert__lead {
	font-weight: 700;
	color: #101828;
}

.ap-alert__highlight {
	padding: 14px 16px;
	border-radius: 12px;
	background: #fef3f2;
	border-left: 4px solid #f04438;
	color: #912018;
	font-weight: 600;
}

.ap-alert__footer {
	padding: 8px 28px 28px;
}

.ap-alert__ok {
	display: block;
	width: 100%;
	padding: 14px 20px;
	border: 0;
	border-radius: 12px;
	background: #04aee8;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(4, 174, 232, 0.35);
	transition: background 0.2s ease, transform 0.2s ease;
}

.ap-alert__ok:hover,
.ap-alert__ok:focus-visible {
	background: #0396c9;
	transform: translateY(-1px);
}

.ap-alert__ok:focus-visible {
	outline: 2px solid #0396c9;
	outline-offset: 3px;
}

body.ap-alert-open {
	overflow: hidden;
}

@media screen and (max-width: 480px) {
	.ap-alert {
		padding: 14px;
	}

	.ap-alert__header {
		padding: 24px 20px 18px;
	}

	.ap-alert__title {
		font-size: 19px;
	}

	.ap-alert__body {
		padding: 20px 20px 6px;
		font-size: 15px;
	}

	.ap-alert__footer {
		padding: 6px 20px 22px;
	}
}

@keyframes ap-alert-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes ap-alert-pop {
	from { opacity: 0; transform: translateY(16px) scale(0.96); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ap-alert__backdrop,
	.ap-alert__dialog {
		animation: none;
	}

	.ap-alert__ok {
		transition: none;
	}
}
