/**
 * CCC Accessibility — Avada theme overrides
 *
 * Loads only when the Avada theme (or an Avada child theme) is active, and only
 * after `avada-stylesheet` in the cascade — so plain specificity is enough and
 * `!important` should stay rare. If you find yourself reaching for it, check the
 * enqueue order on the settings screen first.
 *
 * Sections below are scaffolding for the known Avada trouble spots. Each is left
 * empty on purpose: fill in values validated against a real CCC site rather than
 * shipping guesses. Delete any section you confirm Avada handles correctly.
 */

/* -------------------------------------------------------------------------
 * 1. Main navigation — keyboard and focus visibility
 *
 * Avada's flyout submenus are shown via `:hover` on `.fusion-menu li`, which
 * leaves them invisible to keyboard users unless `:focus-within` is added.
 * ---------------------------------------------------------------------- */

.fusion-main-menu .fusion-dropdown-menu:focus-within > .sub-menu,
.fusion-main-menu li:focus-within > .sub-menu {
	display: block;
	visibility: visible;
	opacity: 1;
}

.fusion-main-menu a:focus-visible,
.fusion-mobile-nav-holder a:focus-visible,
.fusion-secondary-menu a:focus-visible {
	outline: var(--ccc-a11y-focus-width, 3px) solid var(--ccc-a11y-focus-color, #005fcc);
	outline-offset: -3px;
	/* Menu items clip their children; an inset outline stays visible. */
}

/* TODO: verify submenu items receive focus in the mobile flyout (.fusion-mobile-menu). */

/* -------------------------------------------------------------------------
 * 2. Buttons — contrast
 *
 * Avada's Global Options often ship button colours below 4.5:1. Set CCC values
 * here so the fix survives theme option changes.
 * ---------------------------------------------------------------------- */

/*
.fusion-button.button-default,
.fusion-button-wrapper .fusion-button {
	background: #TODO;
	color: #TODO;
	border-color: #TODO;
}

.fusion-button.button-default:hover,
.fusion-button.button-default:focus {
	background: #TODO;
	color: #TODO;
}
*/

/* -------------------------------------------------------------------------
 * 3. Sliders — controls and pause
 *
 * Fusion Slider / Avada Slider autoplays with arrow controls that are often
 * both low contrast and unreachable by keyboard.
 * ---------------------------------------------------------------------- */

.fusion-slider-container .flex-direction-nav a:focus-visible,
.fusion-slider-container .flex-control-nav a:focus-visible,
.tfs-slider .flex-direction-nav a:focus-visible {
	outline: var(--ccc-a11y-focus-width, 3px) solid var(--ccc-a11y-focus-color, #005fcc);
	outline-offset: 2px;
	opacity: 1;
}

/* Arrows are hidden until hover, which hides them from keyboard users too. */
.fusion-slider-container:focus-within .flex-direction-nav a {
	opacity: 1;
}

/* TODO: confirm every slide's text meets contrast over its background image. */

/* -------------------------------------------------------------------------
 * 4. Accordions and tabs — visible state, not colour alone
 * ---------------------------------------------------------------------- */

.fusion-accordian .panel-title a:focus-visible,
.fusion-tabs .nav-tabs > li > a:focus-visible {
	outline: var(--ccc-a11y-focus-width, 3px) solid var(--ccc-a11y-focus-color, #005fcc);
	outline-offset: -3px;
}

/* Reinforce the selected tab with something other than colour. */
/*
.fusion-tabs .nav-tabs > li.active > a {
	border-bottom: 3px solid #TODO;
}
*/

/* -------------------------------------------------------------------------
 * 5. Modals and off-canvas — focus ring inside overlays
 * ---------------------------------------------------------------------- */

.fusion-modal .modal-content :focus-visible,
.fusion-modal .close:focus-visible,
.awb-off-canvas :focus-visible {
	outline: var(--ccc-a11y-focus-width, 3px) solid var(--ccc-a11y-focus-color, #005fcc);
	outline-offset: 2px;
}

/* TODO: Avada modals do not trap focus. If this becomes a priority, add
   assets/js/modules/avada.js and register it from Module_Avada. */

/* -------------------------------------------------------------------------
 * 6. Icon-only controls — target size
 * ---------------------------------------------------------------------- */

.fusion-social-networks .fusion-social-network-icon,
.fusion-mobile-menu-icons a,
.fusion-toggle-icon-line {
	min-width: var(--ccc-a11y-target-size, 44px);
	min-height: var(--ccc-a11y-target-size, 44px);
}

/* -------------------------------------------------------------------------
 * 7. Sticky header offset
 *
 * Avada's sticky header overlaps anchor targets; align the global scroll
 * offset with the real header height for this site.
 * ---------------------------------------------------------------------- */

/*
:root {
	--ccc-a11y-scroll-offset: TODOpx;
}
*/



/* -------------------------------------------------------------------------
 * 8. Miscellaneous — other known issues
 *
 * Avada's FAQ shortcode uses a filter dropdown that is too small to target easily.
 * ---------------------------------------------------------------------- */
.fusion-faq-shortcode .fusion-filter {
	padding: 6px; 
}