/**
 * AcePro Divi child theme — hand-written CSS.
 * Only for the elements Divi has no stock module for: WhatsApp FAB,
 * Quick Access sidebar, and social share buttons. Everything else
 * (colors, fonts, spacing, section layout) should be Divi's own
 * Global Colors / Fonts / Presets — not hardcoded here.
 */

/* WhatsApp floating action button */
.acepro-whatsapp-fab {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}

.acepro-whatsapp-fab:hover {
	transform: scale(1.08);
	color: #fff;
}

/* Quick Access off-canvas sidebar */
.acepro-qab {
	position: fixed;
	top: 50%;
	right: 0;
	z-index: 9997;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
}

.acepro-qab-links {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-right: 10px;
	overflow: hidden;
	max-width: 0;
	transition: max-width 0.25s ease;
}

.acepro-qab.is-open .acepro-qab-links {
	max-width: 230px;
}

/* Desktop shows the sidebar expanded by default (no toggle needed). */
@media (min-width: 1025px) {
	.acepro-qab-links {
		max-width: 230px;
	}
}

/* Each link is its own pill, not one continuous flag-shaped block. */
.acepro-qab-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: #1f2933;
	border-radius: 8px;
	color: #fff;
	font-size: 0.60rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.15s ease;
}

.acepro-qab-link-icon {
	flex-shrink: 0;
	font-size: 1rem;
	line-height: 1;
	display: inline-flex;
}

.acepro-qab-link-icon > svg {
	display: block;
	width: 20px;
	height: 20px;
}

.acepro-qab-link:hover {
	background: #4f46e5;
	color: #fff;
}

.acepro-qab-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 48px;
	border: none;
	background: #1f2933;
	color: #fff;
	cursor: pointer;
}

.acepro-qab-toggle-icon {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.acepro-qab.is-open .acepro-qab-toggle-icon {
	transform: rotate(180deg);
}

@media (min-width: 1025px) {
	.acepro-qab-toggle {
		display: none;
	}
}

@media (max-width: 1024px) {
	.acepro-qab-links {
		max-width: 0 !important;
	}
	.acepro-qab.is-open .acepro-qab-links {
		max-width: 230px !important;
	}
}

/*
 * Per-device visibility — driven by qab-hide-{desktop,tablet,mobile} body
 * classes from acepro_child_option_bool( 'qab_show_desktop' | 'qab_show_tablet'
 * | 'qab_show_mobile' ) in inc/whatsapp-social.php. Breakpoints match the
 * Customizer control labels exactly: desktop >1024px, tablet 641-1024px,
 * mobile <=640px.
 */
@media (min-width: 1025px) {
	body.qab-hide-desktop .acepro-qab {
		display: none;
	}
}

@media (min-width: 641px) and (max-width: 1024px) {
	body.qab-hide-tablet .acepro-qab {
		display: none;
	}
}

@media (max-width: 640px) {
	body.qab-hide-mobile .acepro-qab {
		display: none;
	}
}

/* Social share row (used by the [acepro_share] shortcode) */
.acepro-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 24px 0;
}

.acepro-share-label {
	font-weight: 600;
	margin-right: 4px;
}

.acepro-share-btn {
	padding: 6px 14px;
	border-radius: 100px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #111827;
	font-size: 0.8125rem;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.acepro-share-btn:hover {
	background: #4f46e5;
	border-color: #4f46e5;
	color: #fff;
}

.acepro-share-btn--copy.is-copied {
	background: #25d366;
	border-color: #25d366;
	color: #fff;
}

/* Inline wrapping pill list — used by the [acepro_pill_list] shortcode for
   audience badges / "who this is for" tags on Programs catalog cards, since
   a plain Dynamic Content text field has no way to turn its lines into
   separately-styled elements on its own. */
.acepro-pill-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.acepro-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 100px;
	background: #eef2ff;
	color: #4338ca;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
}

/* [acepro_term_bullet_list] output (Learning Outcomes, etc.) */
.acepro-term-list {
	margin: 0;
	padding-left: 1.25em;
}

.acepro-term-list li {
	margin-bottom: 8px;
}

/* [acepro_domain_facilitators mode="profile"] output */
.acepro-facilitator-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.acepro-facilitator-card {
	flex: 1 1 240px;
}

.acepro-facilitator-role,
.acepro-facilitator-former {
	color: #6b7280;
	font-size: 0.875rem;
	margin: 4px 0;
}

/* [acepro_module_curriculum] output — Curriculum Breakdown on Single: Module */
.acepro-curriculum-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
}

.acepro-curriculum-item {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 14px 18px;
	font-size: 0.9rem;
	border-top: 1px solid #e5e7eb;
}

.acepro-curriculum-item:first-child {
	border-top: none;
}

.acepro-curriculum-seq {
	font-family: ui-monospace, "SF Mono", Consolas, monospace;
	font-size: 0.75rem;
	color: #97a0ae;
	flex-shrink: 0;
	width: 1.6em;
}

.acepro-curriculum-topic {
	flex-grow: 1;
}

.acepro-curriculum-hours {
	flex-shrink: 0;
	color: #6b7280;
	font-variant-numeric: tabular-nums;
	font-size: 0.82rem;
	white-space: nowrap;
}

/* [acepro_module_learning_outcomes] output — Learning Outcomes on Single: Module */
.acepro-outcome-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.acepro-outcome-item {
	display: flex;
	align-items: baseline;
	margin-bottom: 10px;
}

.acepro-outcome-item:last-child {
	margin-bottom: 0;
}

.acepro-outcome-check {
	color: #4f46e5;
	margin-right: 10px;
	flex-shrink: 0;
}

/*
 * Lets assets/js/tab-anchor-nav.js scroll a Divi Tabs module into view
 * without landing underneath the fixed/sticky header — same 110px offset
 * used for the in-page section anchors (.acepro-anchor in mega-menu.css).
 * Harmless on every other page: scroll-margin-top only affects scroll
 * targeting, never layout, so it's safe to apply to every .et_pb_tabs
 * module site-wide rather than gating it per page.
 */
.et_pb_tabs {
	scroll-margin-top: 110px;
}
