/* Urgent alert banner of the Regatta Management App (includes/alert.php, assets/js/alert.js). */
.rde-alert {
	position: sticky;
	top: 0;
	z-index: 100000;
	color: #fff;
	background: #d7263d;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	font: 600 clamp(1.05rem, 0.9rem + 0.6vw, 1.35rem)/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.admin-bar .rde-alert { top: 32px; }
@media (max-width: 782px) { .admin-bar .rde-alert { top: 46px; } }
@media (max-width: 600px) { .admin-bar .rde-alert { top: 0; } }
.rde-alert--warning { background: #f08c00; color: #1d1d1d; }
.rde-alert--info { background: #1c4ed8; }
.rde-alert__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(0.85rem, 0.6rem + 0.8vw, 1.25rem) 1rem;
}
.rde-alert__icon {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 2.2em;
	height: 2.2em;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #d7263d;
	font-weight: 800;
}
.rde-alert--danger .rde-alert__icon { animation: rde-alert-pulse 1.6s ease-in-out infinite; }
.rde-alert--warning .rde-alert__icon { color: #b35f00; }
.rde-alert--info .rde-alert__icon { color: #1c4ed8; }
.rde-alert__body { flex: 1 1 auto; margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.rde-alert__label { display: block; margin-bottom: 0.1em; font-size: 0.8em; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.rde-alert__close {
	flex: 0 0 auto;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.18);
	color: inherit;
	font-family: inherit;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.rde-alert__close:hover, .rde-alert__close:focus-visible { background: rgba(0, 0, 0, 0.32); outline: 2px solid currentColor; outline-offset: 2px; }
@keyframes rde-alert-pulse { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .rde-alert--danger .rde-alert__icon { animation: none; } }

/* Pop-up (danger alerts, or every alert with the setting "Pop-up") */
.rde-alert-open, .rde-alert-open body { overflow: hidden; }
.rde-alert-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(5, 10, 40, 0.78);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	animation: rde-alert-in 0.25s ease-out;
}
.rde-alert-modal__box {
	box-sizing: border-box;
	width: min(640px, 100%);
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: clamp(24px, 5vw, 44px);
	border-radius: 24px;
	background: #fff;
	color: #1d1d1d;
	text-align: center;
	box-shadow: 0 0 0 6px #d7263d, 0 24px 60px rgba(0, 0, 0, 0.45);
}
.rde-alert-modal--warning .rde-alert-modal__box { box-shadow: 0 0 0 6px #f08c00, 0 24px 60px rgba(0, 0, 0, 0.45); }
.rde-alert-modal--info .rde-alert-modal__box { box-shadow: 0 0 0 6px #1c4ed8, 0 24px 60px rgba(0, 0, 0, 0.45); }
.rde-alert-modal__icon {
	display: inline-grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #d7263d;
	color: #fff;
	font-size: 44px;
	font-weight: 800;
	animation: rde-alert-pulse 1.6s ease-in-out infinite;
}
.rde-alert-modal--warning .rde-alert-modal__icon { background: #f08c00; }
.rde-alert-modal--info .rde-alert-modal__icon { background: #1c4ed8; animation: none; }
.rde-alert-modal__label {
	margin: 16px 0 8px;
	color: #d7263d;
	font-size: clamp(1.4rem, 1rem + 2vw, 2rem);
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.rde-alert-modal--warning .rde-alert-modal__label { color: #b35f00; }
.rde-alert-modal--info .rde-alert-modal__label { color: #1c4ed8; }
.rde-alert-modal__text {
	margin: 0 0 24px;
	font-size: clamp(1.15rem, 0.95rem + 1vw, 1.5rem);
	font-weight: 600;
	line-height: 1.45;
	white-space: pre-line;
	overflow-wrap: anywhere;
}
.rde-alert-modal__ok {
	min-width: 12rem;
	min-height: 52px;
	padding: 0 28px;
	border: 0;
	border-radius: 14px;
	background: #121d63;
	color: #fff;
	font-family: inherit;
	font-size: 1.15rem;
	font-weight: 700;
	cursor: pointer;
}
.rde-alert-modal__ok:hover { background: #1c2c8f; }
.rde-alert-modal__ok:focus-visible { outline: 3px solid #121d63; outline-offset: 3px; }
@keyframes rde-alert-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rde-alert-modal, .rde-alert-modal__icon { animation: none; } }
@media print { .rde-alert, .rde-alert-modal { display: none; } }
