/* ==========================================================================
   Shared components - buttons, section headings, floating rails, modal
   ========================================================================== */

.fda-icon {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.fda-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 28px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-family: var(--fda-font-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--fda-speed) var(--fda-ease),
		color var(--fda-speed) var(--fda-ease),
		border-color var(--fda-speed) var(--fda-ease),
		transform var(--fda-speed) var(--fda-ease);
}

.fda-btn:hover,
.fda-btn:focus {
	transform: translateY(-1px);
}

.fda-btn__icon {
	display: inline-flex;
	align-items: center;
}

.fda-btn__icon .fda-icon {
	width: 16px;
	height: 16px;
}

.fda-btn:hover .fda-btn__icon {
	transform: translateX(3px);
	transition: transform var(--fda-speed) var(--fda-ease);
}

.fda-btn--fill {
	background: var(--fda-palette2);
	border-color: var(--fda-palette2);
	color: var(--fda-palette9);
}

.fda-btn--fill:hover,
.fda-btn--fill:focus {
	background: var(--fda-brick);
	border-color: var(--fda-brick);
	color: var(--fda-palette9);
}

.fda-btn--outline {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--fda-palette9);
}

.fda-btn--outline:hover,
.fda-btn--outline:focus {
	background: var(--fda-palette9);
	border-color: var(--fda-palette9);
	color: var(--fda-palette3);
}

.fda-btn--outline-dark {
	background: transparent;
	border-color: rgba(18, 35, 43, 0.3);
	color: var(--fda-palette3);
}

.fda-btn--outline-dark:hover,
.fda-btn--outline-dark:focus {
	background: var(--fda-palette3);
	border-color: var(--fda-palette3);
	color: var(--fda-palette9);
}

.fda-btn--brick {
	background: var(--fda-brick);
	border-color: var(--fda-brick);
	color: var(--fda-palette9);
}

.fda-btn--brick:hover,
.fda-btn--brick:focus {
	background: var(--fda-brick-hover);
	border-color: var(--fda-brick-hover);
	color: var(--fda-palette9);
}

.fda-btn--navy {
	background: var(--fda-navy);
	border-color: var(--fda-navy);
	color: var(--fda-palette9);
}

.fda-btn--navy:hover,
.fda-btn--navy:focus {
	background: var(--fda-navy-hover);
	border-color: var(--fda-navy-hover);
	color: var(--fda-palette9);
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */

.section-head__eyebrow {
	margin: 0 0 12px;
	font-family: var(--fda-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--fda-palette2);
}

.section-head__title {
	margin: 0;
	font-family: var(--fda-font-heading);
	font-size: clamp(30px, 1.6rem + 1.6vw, 46px);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: var(--fda-palette3);
}

.section-head__mark {
	background: none;
	color: var(--fda-palette2);
}

.section-head__rule {
	display: block;
	width: 64px;
	height: 3px;
	margin: 22px 0;
	background: var(--fda-palette2);
}

.section-head__text {
	margin: 0;
	max-width: 62ch;
	font-size: 17px;
	line-height: 1.65;
	color: var(--fda-palette5);
}

.section-head--center {
	text-align: center;
}

.section-head--center .section-head__rule {
	margin-left: auto;
	margin-right: auto;
}

.section-head--center .section-head__text {
	margin-left: auto;
	margin-right: auto;
}

.section-head--light .section-head__eyebrow {
	color: var(--fda-palette7);
}

.section-head--light .section-head__title {
	color: var(--fda-palette9);
}

.section-head--light .section-head__mark {
	color: var(--fda-palette7);
}

.section-head--light .section-head__rule {
	background: var(--fda-palette7);
}

.section-head--light .section-head__text {
	color: var(--fda-palette7);
}

/* --------------------------------------------------------------------------
   Fixed bottom bar
   -------------------------------------------------------------------------- */

.bottom-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 60px;
	background: var(--fda-bar);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	animation: fdaSlideUpBar 0.5s ease;
}

.bottom-bar[hidden] {
	display: none;
}

.bottom-bar__content {
	display: flex;
	align-items: center;
	gap: 18px;
	text-decoration: none;
	color: var(--fda-palette9);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 4px;
	text-transform: uppercase;
	transition: all var(--fda-speed) ease;
}

.bottom-bar__arrow {
	font-size: 26px;
	line-height: 2;
	transition: transform var(--fda-speed) ease;
}

.bottom-bar__content:hover {
	color: var(--fda-palette9);
}

.bottom-bar__content:hover .bottom-bar__arrow {
	transform: translateX(5px);
}

.bottom-bar__close {
	position: absolute;
	right: 35px;
	border: none;
	background: transparent;
	color: var(--fda-palette9);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	opacity: 0.8;
	transition: all var(--fda-speed) ease;
}

.bottom-bar__close:hover {
	opacity: 1;
	transform: scale(1.1);
}

@keyframes fdaSlideUpBar {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	.bottom-bar {
		height: auto;
		padding: 18px 60px 18px 20px;
	}

	.bottom-bar__content {
		font-size: 11px;
		letter-spacing: 2px;
		gap: 10px;
		text-align: center;
	}

	.bottom-bar__arrow {
		font-size: 20px;
	}

	.bottom-bar__close {
		right: 18px;
		font-size: 22px;
	}
}

/* --------------------------------------------------------------------------
   Vertical quick-link rail
   -------------------------------------------------------------------------- */

.sticky-rail {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sticky-rail__btn {
	position: relative;
	width: 55px;
	height: 168px;
	padding-right: 4px;
	border-radius: 8px 0 0 8px;
	background: #264859;
	color: var(--fda-palette9);
	text-decoration: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: all 0.35s ease;
}

.sticky-rail__btn:hover {
	background: #9f1d22;
	width: 60px;
	color: var(--fda-palette9);
}

.sticky-rail__icon {
	display: block;
	margin-bottom: 12px;
	z-index: 2;
}

.sticky-rail__icon .fda-icon {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.sticky-rail__label {
	writing-mode: vertical-rl;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 1.2;
	text-transform: uppercase;
	z-index: 2;
}

.sticky-rail__btn::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
	.sticky-rail__btn {
		width: 55px;
		height: 145px;
	}

	.sticky-rail__btn:hover {
		width: 65px;
	}

	.sticky-rail__icon .fda-icon {
		width: 14px;
		height: 14px;
	}

	.sticky-rail__icon {
		margin-bottom: 10px;
	}

	.sticky-rail__label {
		font-size: 10px;
		letter-spacing: 0.5px;
	}
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.fda-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.fda-modal[hidden] {
	display: none;
}

.fda-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 12, 20, 0.72);
	backdrop-filter: blur(2px);
}

.fda-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 40px;
	border-radius: 10px;
	background: var(--fda-palette9);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.fda-modal__close {
	position: absolute;
	top: 14px;
	right: 18px;
	border: 0;
	background: transparent;
	font-size: 30px;
	line-height: 1;
	color: var(--fda-palette5);
	cursor: pointer;
}

.fda-modal__close:hover {
	color: var(--fda-palette2);
}

.fda-modal__title {
	margin: 0 0 10px;
	font-family: var(--fda-font-heading);
	font-size: 28px;
	font-weight: 700;
	color: var(--fda-palette3);
}

.fda-modal__intro {
	margin: 0 0 24px;
	font-size: 15px;
	color: var(--fda-palette5);
}

.fda-modal__alt {
	margin: 20px 0 0;
	font-size: 14px;
	color: var(--fda-palette5);
}

/* --------------------------------------------------------------------------
   Legacy snippets
   The old site injected a bottom bar and a quick-link rail from a code-snippet
   plugin. The theme renders both now, so the injected copies are hidden here to
   avoid duplicates. Delete those two snippets and this block can go with them.
   -------------------------------------------------------------------------- */

.vertical-sticky-buttons,
body > #fixed-bottom-bar {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.navigation.pagination {
	margin-top: 48px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border: 1px solid rgba(18, 35, 43, 0.15);
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	color: var(--fda-palette3);
	text-decoration: none;
	transition: all var(--fda-speed) var(--fda-ease);
}

.page-numbers:hover,
.page-numbers:focus {
	border-color: var(--fda-palette2);
	color: var(--fda-palette2);
}

.page-numbers.current {
	background: var(--fda-palette2);
	border-color: var(--fda-palette2);
	color: var(--fda-palette9);
}

.page-numbers.dots {
	border-color: transparent;
}
