/*
Theme Name:   Astra Child
Theme URI:    https://github.com/LXD-Integral/cfs-caregiver-hub
Description:  Child theme for CFS Caregiver Hub. All custom CSS and template
              overrides live here so changes are version-controlled rather than
              stored in the WordPress Customizer/database.
Author:       LXD Integral
Author URI:   https://lxdintegral.com
Template:     astra
Version:      1.1.1
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child
*/

/* ============================================================
   Migrated from the Astra Customizer "Additional CSS"
   (dev.lxdintegral.com, custom_css post ID 480) on 2026-06-21.
   These rules now live here, version-controlled, instead of in
   the WordPress database. Once this theme is deployed and active
   on dev, remove the same rules from the Customizer so they don't
   load twice. See docs/customizer-additional-css.css for the
   original capture.
   ============================================================ */

/* Space before H2 in chatbox response */
div.mwai-window-box h2 {
	margin-top: 1em !important;
}

/* Hide Library Entry Meta */
div.entry-meta {
	display: none;
}

/* Remove paragraph bottom margins in Library items */
article.type-library p, .pilot-feature p {
	margin-bottom: 0 !important;
}

/* Add Padding to images in Library Grid */
#wpupg-grid-library .wpupg-item div.wpupg-item-image img {
	padding: 0 12px;
}

/* ============================================================
   CFS custom FAQ filter bar (dropdown display)
   Progressive enhancement of the YITH FAQ category pills, built
   by js/faq-dropdowns.js (which adds body.cfs-faq-active) and
   toggled by CFS_FAQ_DROPDOWNS in functions.php. If the JS does
   not run, the native pills remain and these rules stay inert.
   ============================================================ */

/* Hide the native pills only once the JS bar is in place (fail-safe). */
body.cfs-faq-active .yith-faqs-categories {
	display: none !important;
}

.cfs-faq-filterbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	margin: 1.2em 0 1.6em;
}

.cfs-faq-filterbar .cfs-faq-all,
.cfs-faq-filterbar .cfs-faq-select {
	font: inherit;
	font-size: 0.95em;
	line-height: 1.2;
	width: auto; /* override Astra's global select { width: 100% } */
	flex: 0 0 auto;
	margin: 0;
	padding: 0.55em 0.9em;
	border: 1px solid rgba(0, 0, 0, 0.35);
	border-radius: 6px;
	background-color: #f6e8d6;
	color: #1f2d3d;
	cursor: pointer;
}

.cfs-faq-filterbar .cfs-faq-select {
	min-width: 12em;
	max-width: 100%;
	padding-right: 2.2em;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231f2d3d' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75em center;
	background-size: 0.7em auto;
}

.cfs-faq-filterbar .cfs-faq-all:hover,
.cfs-faq-filterbar .cfs-faq-select:hover,
.cfs-faq-filterbar .cfs-faq-select:focus {
	border-color: #138a8a;
}

.cfs-faq-filterbar .cfs-faq-all.is-active {
	background-color: #138a8a;
	border-color: #138a8a;
	color: #fff;
}

/* Screen-reader-only labels (in case the theme lacks the helper). */
.cfs-faq-filterbar .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Tablet and below: stack the controls full-width instead of wrapping into an
   uneven grid. Astra's tablet breakpoint is 768px; the full-width treatment is
   the right UX through mobile too, so one max-width:768px rule covers both. */
@media (max-width: 768px) {
	.cfs-faq-filterbar {
		flex-direction: column;
		align-items: stretch;
		flex-wrap: nowrap;
	}

	.cfs-faq-filterbar .cfs-faq-all,
	.cfs-faq-filterbar .cfs-faq-select {
		width: 100%;
		min-width: 0;
		max-width: none;
		flex: 0 0 auto;
		text-align: left;
	}
}
