/*
 * **********************************************************************
 * Kadence Child Theme — FAQ Popup Styles
 *
 * Floating trigger button + modal overlay for the context-sensitive
 * FAQ system (mah_faq custom post type).
 *
 * @package  KadenceChild
 * @version  1.0.4
 * @updated  2026-06-19
 * **********************************************************************
 */

/* =============================================================================
   Trigger button
   ============================================================================= */

@keyframes mah-faq-pulse {
	0%, 100% { font-size: 1.5rem; }
	50%       { font-size: 1.125rem; }
}

#mah-faq-btn {
	animation: mah-faq-pulse 2.4s ease-in-out infinite;
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--btn-primary-bg);
	color: var(--btn-primary-text);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	border: none;
	cursor: pointer;
	z-index: 9000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

#mah-faq-btn:hover,
#mah-faq-btn:focus {
	color: var(--btn-primary-hover-text);
	outline: 2px solid #fff;
	outline-offset: 2px;
	animation-play-state: paused;
}

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

#mah-faq-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	z-index: 9001;
	display: flex;
	align-items: center;
	justify-content: center;
}

#mah-faq-overlay[hidden] { display: none; }

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

#mah-faq-modal {
	background: #fff;
	border-radius: 8px;
	width: min(640px, 90vw);
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 6px 32px rgba(0, 0, 0, .3);
	overflow: hidden;
}

/* =============================================================================
   Header
   ============================================================================= */

#mah-faq-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: var(--mah-header-bg);
	color: #fff;
	flex-shrink: 0;
}

#mah-faq-header h2 {
	margin: 0;
	font-size: 1.1rem;
	color: #fff;
}

#mah-faq-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: .85;
}

#mah-faq-close:hover,
#mah-faq-close:focus {
	opacity: 1;
	outline: 2px solid rgba(255, 255, 255, .6);
	border-radius: 2px;
}

/* =============================================================================
   Body / accordion
   ============================================================================= */

#mah-faq-body {
	overflow-y: auto;
	padding: 12px 20px 20px;
	flex: 1;
}

.mah-faq-loading,
.mah-faq-empty {
	color: #666;
	font-style: italic;
	text-align: center;
	padding: 32px 0;
	margin: 0;
}

.mah-faq-item {
	border-bottom: 1px solid #e0e0e0;
}

.mah-faq-item:last-child { border-bottom: none; }

.mah-faq-question {
	width: 100%;
	background: none;
	border: none;
	text-align: left;
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a1a;
	cursor: pointer;
	padding: 14px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.mah-faq-question::after {
	content: '+';
	font-size: 1.3rem;
	color: var(--mah-header-bg);
	flex-shrink: 0;
	font-weight: 400;
}

.mah-faq-question[aria-expanded="true"]::after { content: '−'; }

.mah-faq-answer {
	padding: 0 0 14px;
	display: none;
	color: #444;
	line-height: 1.65;
}

.mah-faq-answer p:first-child { margin-top: 0; }
.mah-faq-answer p:last-child  { margin-bottom: 0; }

/* =============================================================================
   Reduced motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
	#mah-faq-btn {
		animation: none;
	}
}
