/**
 * **********************************************************************
 * Kadence Child Theme — Specials Popup (public)
 *
 * Styles for the promotions popup built by js/specials.js.
 * Scoped to .mah-specials-* classes.
 *
 * @package  KadenceChild
 * @version  1.1.0
 * @updated  2026-11-19
 * **********************************************************************
 */

/* =============================================================================
   Overlay
   ============================================================================= */

.mah-specials-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001; /* above the FAQ button (9000) and admin editors (100000) */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--mah-space-4, 1rem);
	background: rgba( 0, 0, 0, 0.6 );
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mah-specials-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

html.mah-specials-lock,
html.mah-specials-lock body {
	overflow: hidden;
}

/* =============================================================================
   Modal
   ============================================================================= */

.mah-specials-modal {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc( 100vh - 2rem );
	max-height: calc( 100dvh - 2rem );
	overflow-y: auto;
	background: var(--mah-white);
	border-radius: var(--mah-radius-lg);
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.35 );
	transform: translateY( 14px ) scale( 0.98 );
	transition: transform 0.25s ease;
}

.mah-specials-overlay.is-open .mah-specials-modal {
	transform: none;
}

/* ── Close button ──────────────────────────────────────────────────────────── */

.mah-specials-overlay .mah-specials-close {
	position: absolute;
	top: 0.5rem;
	inset-inline-end: 0.5rem;
	z-index: 1;
	width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: var(--mah-radius-pill);
	background: rgba( 255, 255, 255, 0.9 );
	color: var(--mah-grey-900);
	font-size: var(--mah-font-xl);
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.2 );
}

.mah-specials-overlay .mah-specials-close:hover,
.mah-specials-overlay .mah-specials-close:focus-visible {
	color: var(--mah-black);
	background: var(--mah-white);
}

/* =============================================================================
   Slide content
   ============================================================================= */

.mah-specials-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--mah-radius-lg) var(--mah-radius-lg) 0 0;
}

.mah-specials-text {
	padding: 1rem 1.25rem 1.25rem;
	text-align: center;
}

.mah-specials-title {
	margin: 0 0 0.4rem;
	font-family: var(--mah-font-display);
	font-size: var(--mah-font-xl);
	color: var(--mah-green-dark);
	line-height: 1.25;
}

.mah-specials-body {
	margin: 0 0 1rem;
	font-size: var(--mah-font-base-sm);
	color: var(--mah-grey-600);
	line-height: 1.5;
}

.mah-specials-cta {
	display: inline-block;
	padding: 0.7rem 1.5rem;
	border-radius: var(--mah-radius-pill);
	background: var(--btn-primary-bg, var(--mah-green));
	color: var(--btn-primary-text, var(--mah-white));
	font-weight: 700;
	text-decoration: none;
	transition: background 0.18s ease;
}

.mah-specials-cta:hover,
.mah-specials-cta:focus-visible {
	background: var(--mah-green-mid);
	color: var(--btn-primary-hover-text, var(--mah-white));
}

/* =============================================================================
   Multi-special navigation
   ============================================================================= */

.mah-specials-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0 1rem 1rem;
}

.mah-specials-nav[hidden] {
	display: none;
}

.mah-specials-arrow {
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1.5px solid var(--mah-grey-300);
	border-radius: var(--mah-radius-pill);
	background: var(--mah-white);
	color: var(--mah-grey-600);
	font-size: var(--mah-font-xl);
	line-height: 1;
	cursor: pointer;
}

.mah-specials-dots {
	display: flex;
	gap: 0.4rem;
}

.mah-specials-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--mah-radius-pill);
	background: var(--mah-grey-300);
}

.mah-specials-dot.is-active {
	background: var(--mah-green);
}

/* =============================================================================
   Reopen tab — docked at the right edge, same look as the Events tab
   (css/upcoming-events.css). Centred by default; js/specials.js moves it
   just below the Events panel/tab on pages that have one.
   z-index sits just under the Events panel (500) so its open drawer
   covers this tab rather than the other way round.
   ============================================================================= */

.mah-specials-tab {
	position: fixed;
	top: 50%;
	transform: translateY( -50% );
	right: 0;
	z-index: 499;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	width: 40px;
	min-height: 100px;
	padding: 0.6rem 0;
	background: var(--mah-header-bg);
	color: var(--mah-white);
	font-size: var(--mah-font-sm);
	font-weight: 700;
	letter-spacing: .05em;
	border: none;
	border-radius: var(--mah-radius-md) 0 0 var(--mah-radius-md);
	box-shadow: -4px 0 12px rgba( 0, 0, 0, .15 );
	cursor: pointer;
	animation: mah-specials-tab-in 0.3s ease;
}

/* Positioned by js/specials.js below the Events panel/tab. */
.mah-specials-tab.is-anchored {
	transform: none;
}

.mah-specials-tab[hidden] {
	display: none;
}

.mah-specials-tab:hover,
.mah-specials-tab:focus-visible {
	background: var(--mah-green-mid);
	color: var(--mah-white);
}

/* Bottom-to-top, matching the Events tab's label. */
.mah-specials-tab span {
	writing-mode: vertical-rl;
	transform: rotate( 180deg );
}

.mah-specials-tab svg {
	transform: rotate( -90deg );
}

@keyframes mah-specials-tab-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

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

@media ( max-height: 700px ) {
	.mah-specials-modal {
		max-width: 360px;
	}
}
