/*
Theme Name: Citably Kadence
Theme URI: https://citablyai.com/
Description: Kadence child theme for Citably. Renders the sitewide header, footer and mobile menu as server-side PHP so every navigation link exists in the raw HTML before any JavaScript runs. Replaces the runtime-injected chrome.
Author: Vyda Labs
Author URI: https://citablyai.com/
Template: kadence
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: citably-kadence
*/

/*
 * This file exists for the theme header above and is enqueued after the parent
 * stylesheet. The chrome itself lives in assets/css/citably-chrome.css, which is
 * generated by cms/scripts/port-chrome-css.js and enqueued separately.
 *
 * Put nothing here that belongs in the chrome stylesheet.
 */

/* ---------------------------------------------------------------------------
 * Additions the ported chrome stylesheet does not cover.
 *
 * The injected version opened dropdowns on :hover alone, which leaves keyboard
 * and touch users with no way in. These add a class-based open state alongside
 * the hover rule rather than replacing it, and a skip link, which the injected
 * header had none of.
 * ------------------------------------------------------------------------- */

.ctb-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 3000;
	padding: 10px 16px;
	background: #111111;
	color: #F8FAFC;
	font-family: Inter, sans-serif;
	font-size: 14px;
	border-radius: 0 0 8px 0;
}

.ctb-skip:focus {
	left: 0;
}

/* keyboard and touch equivalent of the hover rule */
#ctb-header .ctb-navitem.ctb-open .ctb-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* accordion panels are in the markup always; this is the only thing that opens them */
#ctb-mobile-menu .ctb-accwrap.ctb-open .ctb-accpanel {
	display: flex;
}

#ctb-mobile-menu .ctb-accwrap.ctb-open .ctb-caret {
	transform: rotate(180deg);
}

#ctb-mobile-menu .ctb-caret {
	transition: transform 200ms ease;
}

/* ---------------------------------------------------------------------------
 * Layout after the translate widget was removed.
 *
 * Three of the removed rules carried layout rather than switcher styling: two
 * sized and spaced the switcher inside the header actions group, and one gave
 * the mobile strip a full width plus a top and bottom border.
 *
 * The first two need no replacement. The header actions group is flex with
 * gap:18px and has no child-count-dependent rule, so the three remaining
 * controls close up on their own at every breakpoint. The same holds for the
 * footer legal line, which is centred, and the mobile actions row, which is a
 * column. Nothing was respaced or realigned.
 *
 * The third did carry something shared: those borders were the only separator
 * between the mobile nav and the actions row. That separator is restored below
 * on the element that now sits at the junction.
 * ------------------------------------------------------------------------- */

#ctb-mobile-menu .ctb-mactions {
	border-top: 1px solid var(--c-bd);
}
