/**
 * Solidarity Alert Banner.
 *
 * A slim fixed strip plus the modal it opens. Both ship hidden and are revealed
 * by the script, so a cached page never flashes a banner the visitor already
 * closed.
 *
 * Astra and Elementor style bare <button>/<a> elements site-wide, so every
 * control here resets the inherited typography explicitly.
 */

.sol-alert,
.sol-modal {
	--sol-red: #ff3131;
	--sol-ink: #12141a;
}

/* ======================================================================
 * The strip
 * ==================================================================== */

.sol-alert {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99995;
	box-sizing: border-box;
	background: linear-gradient( 100deg, #171a22 0%, #12141a 45%, #1c1216 100% );
	border-bottom: 2px solid var(--sol-red);
	box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.28 );
	color: #fff;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.sol-alert[hidden],
.sol-modal[hidden] {
	display: none;
}

.sol-alert *,
.sol-alert *::before,
.sol-alert *::after,
.sol-modal *,
.sol-modal *::before,
.sol-modal *::after {
	box-sizing: border-box;
}

.sol-alert__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 1340px;
	margin: 0 auto;
	padding: 9px 16px;
}

.sol-alert__lead {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.sol-alert__lead b {
	color: var(--sol-red);
	font-weight: 700;
}

/* --- pulsing "urgent" pill --------------------------------------------- */

.sol-alert__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 5px 12px 5px 10px;
	border-radius: 999px;
	background: rgba( 255, 49, 49, 0.14 );
	color: #ff8b8b;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.sol-alert__dot {
	position: relative;
	display: block;
	width: 9px;
	height: 9px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--sol-red);
}

/* The halo rests invisible for most of the cycle and flares up once, so the
   bullet reads as an occasional blink rather than a strobe. */
.sol-alert__dot i {
	position: absolute;
	inset: 0;
	display: block;
	border-radius: 50%;
	background: var(--sol-red);
	opacity: 0;
	animation: sol-alert-ping 3.4s cubic-bezier( 0, 0, 0.2, 1 ) infinite;
}

.sol-alert__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--sol-red);
	animation: sol-alert-blink 3.4s ease-in-out infinite;
}

@keyframes sol-alert-ping {
	0% {
		transform: scale( 1 );
		opacity: 0.75;
	}
	28% {
		transform: scale( 2.9 );
		opacity: 0;
	}
	100% {
		transform: scale( 2.9 );
		opacity: 0;
	}
}

@keyframes sol-alert-blink {
	0%,
	100% {
		opacity: 1;
	}
	14% {
		opacity: 0.35;
	}
	30% {
		opacity: 1;
	}
}

/* --- strip controls ----------------------------------------------------- */

.sol-alert__open {
	flex: 0 0 auto;
	margin: 0;
	padding: 8px 18px;
	border: 1px solid rgba( 255, 255, 255, 0.35 );
	border-radius: 999px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.2;
	text-transform: none;
	white-space: nowrap;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.sol-alert__open:hover,
.sol-alert__open:focus-visible {
	background: rgba( 255, 255, 255, 0.12 );
	border-color: #fff;
	color: #fff;
}

.sol-alert__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.08 );
	color: rgba( 255, 255, 255, 0.7 );
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.sol-alert__close:hover,
.sol-alert__close:focus-visible {
	background: rgba( 255, 255, 255, 0.18 );
	color: #fff;
}

.sol-alert :focus-visible,
.sol-modal :focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* --- page offset -------------------------------------------------------- */

html.sol-alert-on body {
	padding-top: var( --sol-alert-h, 0px );
}

html.sol-alert-on #wpadminbar {
	top: var( --sol-alert-h, 0px );
}

html.sol-modal-open,
html.sol-modal-open body {
	overflow: hidden;
}

/* ======================================================================
 * The modal
 * ==================================================================== */

.sol-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.sol-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 8, 9, 12, 0.72 );
	-webkit-backdrop-filter: blur( 3px );
	backdrop-filter: blur( 3px );
	animation: sol-modal-fade 0.2s ease;
}

.sol-modal__card {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: calc( 100vh - 48px );
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 30px 34px 26px;
	border-top: 4px solid var(--sol-red);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 70px rgba( 0, 0, 0, 0.45 );
	color: #1f2430;
	animation: sol-modal-rise 0.22s ease;
}

@keyframes sol-modal-fade {
	from {
		opacity: 0;
	}
}

@keyframes sol-modal-rise {
	from {
		opacity: 0;
		transform: translateY( 14px );
	}
}

.sol-modal__x {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 18, 20, 26, 0.06 );
	color: #4a5160;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.sol-modal__x:hover,
.sol-modal__x:focus-visible {
	background: rgba( 255, 49, 49, 0.12 );
	color: var(--sol-red);
}

.sol-modal__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	padding-right: 40px;
}

.sol-modal__date {
	color: #6b7280;
	font-size: 13px;
	font-weight: 600;
}

.sol-modal__title {
	margin: 0 0 14px;
	color: var(--sol-ink);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
}

.sol-modal__body p {
	margin: 0 0 12px;
	color: #333a48;
	font-size: 15px;
	line-height: 1.6;
}

.sol-modal__list {
	margin: 0 0 16px;
	padding: 0 0 0 20px;
	list-style: disc;
}

.sol-modal__list li {
	margin: 0 0 6px;
	color: #333a48;
	font-size: 14.5px;
	line-height: 1.55;
}

.sol-modal__quote {
	margin: 0 0 16px;
	padding: 12px 0 12px 16px;
	border-left: 3px solid var(--sol-red);
	background: none;
	quotes: none;
}

.sol-modal__quote p {
	margin: 0 0 6px;
	color: #1f2430;
	font-size: 15px;
	font-style: italic;
	line-height: 1.55;
}

.sol-modal__quote cite {
	display: block;
	color: #6b7280;
	font-size: 13px;
	font-style: normal;
}

.sol-modal__appeal {
	font-weight: 600;
}

.sol-modal__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid rgba( 18, 20, 26, 0.08 );
}

.sol-modal__cta {
	display: inline-block;
	flex: 1 1 auto;
	margin: 0;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--sol-red);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: normal;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.sol-modal__cta:hover,
.sol-modal__cta:focus-visible {
	background: #e51e1e;
	color: #fff;
	text-decoration: none;
	transform: translateY( -1px );
}

.sol-modal__dismiss {
	flex: 0 0 auto;
	margin: 0;
	padding: 13px 22px;
	border: 1px solid rgba( 18, 20, 26, 0.18 );
	border-radius: 999px;
	background: transparent;
	color: #4a5160;
	cursor: pointer;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.2;
	text-transform: none;
	transition: border-color 0.18s ease, color 0.18s ease;
}

.sol-modal__dismiss:hover,
.sol-modal__dismiss:focus-visible {
	border-color: #4a5160;
	color: var(--sol-ink);
}

/* ======================================================================
 * Small screens
 * ==================================================================== */

@media ( max-width: 782px ) {
	.sol-alert__inner {
		flex-wrap: wrap;
		gap: 8px 10px;
		padding: 8px 12px;
	}

	/* Two rows: badge + controls, then the headline. The order rules are scoped
	   to the strip — the dialog head reuses .sol-alert__badge. */
	.sol-alert__inner .sol-alert__badge {
		order: 1;
	}

	.sol-alert__open {
		order: 2;
		margin-left: auto;
		padding: 7px 15px;
		font-size: 12.5px;
	}

	.sol-alert__close {
		order: 3;
	}

	.sol-alert__lead {
		order: 4;
		flex: 1 1 100%;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 12.5px;
	}

	.sol-modal {
		padding: 0;
		align-items: flex-end;
	}

	.sol-modal__card {
		max-width: none;
		max-height: 92vh;
		padding: 26px 20px 20px;
		border-radius: 14px 14px 0 0;
	}

	.sol-modal__title {
		font-size: 20px;
	}

	.sol-modal__actions {
		flex-wrap: wrap;
	}

	.sol-modal__cta,
	.sol-modal__dismiss {
		flex: 1 1 100%;
		text-align: center;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.sol-alert__dot i,
	.sol-alert__dot::after,
	.sol-modal__backdrop,
	.sol-modal__card {
		animation: none;
	}

	.sol-alert__dot i {
		opacity: 0.35;
		transform: scale( 2.2 );
	}

	.sol-modal__cta,
	.sol-alert__open {
		transition: none;
	}
}
