/**
 * ChaCha Home — DEV-20 Help Center / FAQ Frontend v1.1
 * B1B visual-density polish.
 */

body.chacha-help-center-page {
	--chacha-help-ink: var(--chacha-text-strongest, #201a17);
	--chacha-help-text: var(--chacha-text, #3b322d);
	--chacha-help-muted: var(--chacha-text-muted, #6a5f58);
	--chacha-help-accent: var(--chacha-accent, #b08d57);
	--chacha-help-border: var(--chacha-subtle, #d7cec4);
	--chacha-help-bg: #faf7f2;
	--chacha-help-surface: #fffdfc;
	--chacha-help-soft: #f3ede5;
	--chacha-help-shell: min(calc(100% - 48px), 1400px);

	background: var(--chacha-help-bg);
}

/**
 * Kadence page-shell ownership.
 * The Help Center is a complete page composition, so generic page spacing,
 * card padding and block margins must not create a second outer rhythm.
 */
body.chacha-help-center-page .content-area,
body.chacha-help-center-page .site-main {
	margin: 0;
	padding: 0;
}

body.chacha-help-center-page .entry-content-wrap {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

body.chacha-help-center-page .entry-content {
	margin: 0;
}

body.chacha-help-center-page .entry-content > * {
	margin-top: 0;
	margin-bottom: 0;
}

.chacha-help-center,
.chacha-help-center * {
	box-sizing: border-box;
}

.chacha-help-center {
	color: var(--chacha-help-text);
	background: var(--chacha-help-bg);
}

.chacha-help-center__shell {
	width: var(--chacha-help-shell);
	margin-inline: auto;
}

/* ==========================================================
   HERO
   ========================================================== */

.chacha-help-center__hero {
	padding: 30px 0 32px;
	background: var(--chacha-help-bg);
}

.chacha-help-center__hero-inner {
	text-align: center;
}

body.chacha-help-center-page .entry-content .chacha-help-center__eyebrow,
body.chacha-help-center-page .entry-content .chacha-help-center__title,
body.chacha-help-center-page .entry-content .chacha-help-center__intro,
body.chacha-help-center-page .entry-content .chacha-help-search__status {
	margin: 0;
}

.chacha-help-center__eyebrow,
.chacha-help-section__eyebrow,
.chacha-help-sidebar__eyebrow,
.chacha-help-empty__eyebrow,
.chacha-help-search-empty__eyebrow,
.chacha-help-contact__eyebrow {
	font-family: var(--chacha-font-body, Inter, sans-serif);
	font-size: 9px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.17em;
	color: var(--chacha-help-accent);
}

.chacha-help-center__title {
	margin-top: 9px !important;
	font-family: var(--chacha-font-heading, "Cormorant Garamond", Georgia, serif);
	font-size: clamp(38px, 3.6vw, 48px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.018em;
	color: var(--chacha-help-ink);
}

.chacha-help-center__intro {
	max-width: 660px;
	margin: 12px auto 0 !important;
	font-family: var(--chacha-font-body, Inter, sans-serif);
	font-size: 14px;
	line-height: 1.6;
	color: var(--chacha-help-muted);
}

/* ==========================================================
   SEARCH
   ========================================================== */

.chacha-help-search {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	align-items: center;
	column-gap: 12px;
	width: min(100%, 820px);
	height: 52px;
	margin: 22px auto 0;
	padding: 0 18px;
	border: 1px solid var(--chacha-help-border);
	background: rgba(255, 253, 252, 0.92);
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		background-color 180ms ease;
}

.chacha-help-search:focus-within {
	border-color: var(--chacha-help-accent);
	background: #fff;
	box-shadow: 0 0 0 1px var(--chacha-help-accent);
}

.chacha-help-search__icon {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: var(--chacha-help-muted);
	pointer-events: none;
	transform: none;
}

.chacha-help-search__icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.chacha-help-search__input {
	width: 100%;
	height: 100%;
	min-width: 0;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	font-family: var(--chacha-font-body, Inter, sans-serif);
	font-size: 13px;
	line-height: 1;
	color: var(--chacha-help-ink);
	outline: none !important;
}

.chacha-help-search__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

.chacha-help-search__input::placeholder {
	color: #8a7e76;
	opacity: 1;
}

.chacha-help-search.is-disabled {
	opacity: 0.58;
}

.chacha-help-search__status {
	min-height: 18px;
	margin-top: 6px !important;
	font-size: 11px;
	color: var(--chacha-help-muted);
}

/* ==========================================================
   MOBILE CATEGORY RAIL
   ========================================================== */

.chacha-help-mobile-nav {
	display: none;
	background: var(--chacha-help-bg);
}

.chacha-help-center__content {
	padding: 22px 0 46px;
	background: var(--chacha-help-bg);
}

/* ==========================================================
   DESKTOP LAYOUT / CATEGORY NAV
   ========================================================== */

.chacha-help-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: clamp(36px, 4vw, 56px);
	align-items: start;
}

.chacha-help-sidebar__inner {
	position: sticky;
	top: 28px;
	padding: 2px 0;
}

body.admin-bar .chacha-help-sidebar__inner {
	top: 60px;
}

.chacha-help-sidebar__eyebrow {
	margin: 0 0 12px;
}

.chacha-help-sidebar__nav {
	display: grid;
	gap: 4px;
}

.chacha-help-sidebar__nav a {
	position: relative;
	display: block;
	min-height: 42px;
	padding: 11px 34px 11px 12px;
	border: 1px solid transparent;
	border-radius: 5px;
	font-family: var(--chacha-font-body, Inter, sans-serif);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--chacha-help-text);
	text-decoration: none;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		color 160ms ease;
}

.chacha-help-sidebar__nav a::after {
	content: "›";
	position: absolute;
	top: 50%;
	right: 12px;
	font-size: 18px;
	line-height: 1;
	color: var(--chacha-help-accent);
	opacity: 0.62;
	transform: translateY(-52%);
}

.chacha-help-sidebar__nav a:hover,
.chacha-help-sidebar__nav a:focus-visible,
.chacha-help-sidebar__nav a[aria-current="true"] {
	border-color: rgba(176, 141, 87, 0.12);
	background: var(--chacha-help-soft);
	color: var(--chacha-help-ink);
}

.chacha-help-sidebar__nav a[aria-current="true"]::after {
	opacity: 1;
}

.chacha-help-sidebar__nav a:focus-visible,
.chacha-help-mobile-nav__rail a:focus-visible,
.chacha-help-contact__cta:focus-visible,
.chacha-help-empty a:focus-visible,
.chacha-help-search-empty a:focus-visible {
	outline: 2px solid var(--chacha-help-accent);
	outline-offset: 2px;
}

/* ==========================================================
   FAQ SECTIONS
   ========================================================== */

.chacha-help-sections {
	min-width: 0;
}

.chacha-help-section {
	scroll-margin-top: 24px;
}

.chacha-help-section + .chacha-help-section {
	margin-top: 34px;
}

.chacha-help-section__header {
	margin-bottom: 10px;
}

body.chacha-help-center-page .entry-content .chacha-help-section__header h2,
body.chacha-help-center-page .entry-content .chacha-help-empty h2,
body.chacha-help-center-page .entry-content .chacha-help-search-empty h2,
body.chacha-help-center-page .entry-content .chacha-help-contact h2 {
	margin: 0;
	font-family: var(--chacha-font-heading, "Cormorant Garamond", Georgia, serif);
	font-weight: 500;
	line-height: 1.05;
	color: var(--chacha-help-ink);
}

.chacha-help-section__header h2 {
	font-size: clamp(26px, 2.4vw, 32px);
}

.chacha-help-section__eyebrow {
	margin: 0 0 7px;
}

.chacha-help-section__items {
	display: grid;
	gap: 7px;
}

/* ==========================================================
   ACCORDION
   ========================================================== */

.chacha-help-faq {
	margin: 0;
	border: 1px solid rgba(215, 206, 196, 0.92);
	border-radius: 7px;
	background: rgba(255, 253, 252, 0.82);
	overflow: clip;
}

.chacha-help-faq[hidden],
.chacha-help-section[hidden],
[data-chacha-help-nav][hidden],
.chacha-help-search-empty[hidden] {
	display: none;
}

.chacha-help-faq__summary {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 50px;
	padding: 11px 15px;
	list-style: none;
	cursor: pointer;
	font-family: var(--chacha-font-body, Inter, sans-serif);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.42;
	color: var(--chacha-help-ink);
}

.chacha-help-faq__summary::-webkit-details-marker {
	display: none;
}

.chacha-help-faq__summary:focus-visible {
	outline: 2px solid var(--chacha-help-accent);
	outline-offset: -2px;
}

.chacha-help-faq__question {
	min-width: 0;
}

.chacha-help-faq__icon {
	position: relative;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	color: var(--chacha-help-muted);
}

.chacha-help-faq__icon::before,
.chacha-help-faq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 1px;
	background: currentColor;
	transform-origin: center;
	transition: transform 160ms ease;
}

.chacha-help-faq__icon::before {
	transform: translate(-77%, -50%) rotate(45deg);
}

.chacha-help-faq__icon::after {
	transform: translate(-23%, -50%) rotate(-45deg);
}

.chacha-help-faq[open] .chacha-help-faq__icon::before {
	transform: translate(-77%, -50%) rotate(-45deg);
}

.chacha-help-faq[open] .chacha-help-faq__icon::after {
	transform: translate(-23%, -50%) rotate(45deg);
}

.chacha-help-faq__answer {
	max-width: 800px;
	padding: 0 44px 13px 15px;
	font-family: var(--chacha-font-body, Inter, sans-serif);
	font-size: 13px;
	line-height: 1.65;
	color: var(--chacha-help-muted);
}

.chacha-help-faq__answer > :first-child {
	margin-top: 0;
}

.chacha-help-faq__answer > :last-child {
	margin-bottom: 0;
}

.chacha-help-faq__answer a {
	color: var(--chacha-help-ink);
	text-underline-offset: 3px;
}

/* ==========================================================
   EMPTY / SEARCH EMPTY
   ========================================================== */

.chacha-help-empty,
.chacha-help-search-empty {
	max-width: 760px;
	margin: 0 auto;
	padding: 32px 34px;
	border: 1px solid var(--chacha-help-border);
	background: rgba(255, 253, 252, 0.62);
	text-align: center;
}

.chacha-help-empty__eyebrow,
.chacha-help-search-empty__eyebrow {
	margin: 0 0 8px;
}

.chacha-help-empty h2,
.chacha-help-search-empty h2 {
	font-size: clamp(27px, 2.7vw, 34px);
}

.chacha-help-empty p:not(.chacha-help-empty__eyebrow),
.chacha-help-search-empty p:not(.chacha-help-search-empty__eyebrow) {
	max-width: 600px;
	margin: 11px auto 0;
	font-size: 13px;
	line-height: 1.65;
	color: var(--chacha-help-muted);
}

.chacha-help-empty a,
.chacha-help-search-empty a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.035em;
	color: var(--chacha-help-ink);
	text-decoration: none;
}

/* ==========================================================
   CONTACT FALLBACK — only rendered when FAQs exist
   ========================================================== */

.chacha-help-contact {
	padding: 30px 0 32px;
	border-top: 1px solid var(--chacha-help-border);
	background: var(--chacha-help-bg);
}

.chacha-help-contact__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 36px;
}

.chacha-help-contact__eyebrow {
	margin: 0 0 6px;
}

.chacha-help-contact h2 {
	font-size: clamp(26px, 2.5vw, 32px);
}

.chacha-help-contact p:not(.chacha-help-contact__eyebrow) {
	margin: 7px 0 0;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--chacha-help-muted);
}

.chacha-help-contact__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 42px;
	padding: 0 18px;
	border: 1px solid var(--chacha-help-ink);
	background: transparent;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--chacha-help-ink);
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 160ms ease,
		color 160ms ease;
}

.chacha-help-contact__cta:hover {
	background: var(--chacha-help-ink);
	color: #fff;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1024px) {
	.chacha-help-center__hero {
		padding: 28px 0 30px;
	}

	.chacha-help-layout {
		grid-template-columns: 190px minmax(0, 1fr);
		gap: 32px;
	}
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {
	body.chacha-help-center-page {
		--chacha-help-shell: calc(100% - 36px);
	}

	.chacha-help-center__hero {
		padding: 24px 0 22px;
	}

	.chacha-help-center__hero-inner {
		text-align: left;
	}

	.chacha-help-center__title {
		margin-top: 8px !important;
		font-size: clamp(34px, 10.2vw, 40px);
		line-height: 1.02;
	}

	.chacha-help-center__intro {
		margin: 10px 0 0 !important;
		font-size: 13px;
		line-height: 1.55;
	}

	.chacha-help-search {
		grid-template-columns: 18px minmax(0, 1fr);
		column-gap: 10px;
		height: 48px;
		margin-top: 18px;
		padding: 0 14px;
	}

	.chacha-help-search__icon,
	.chacha-help-search__icon svg {
		width: 18px;
		height: 18px;
	}

	.chacha-help-search__input {
		font-size: 12.5px;
	}

	.chacha-help-mobile-nav {
		display: block;
	}

	.chacha-help-mobile-nav__rail {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		padding: 10px 0;
		overscroll-behavior-inline: contain;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.chacha-help-mobile-nav__rail::-webkit-scrollbar {
		display: none;
	}

	.chacha-help-mobile-nav__rail a {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		min-height: 38px;
		padding: 0 14px;
		border: 1px solid var(--chacha-help-border);
		border-radius: 999px;
		background: transparent;
		font-size: 12px;
		font-weight: 600;
		color: var(--chacha-help-text);
		text-decoration: none;
		white-space: nowrap;
	}

	.chacha-help-mobile-nav__rail a[aria-current="true"] {
		border-color: transparent;
		background: #eee2d1;
		color: var(--chacha-help-ink);
	}

	.chacha-help-center__content {
		padding: 22px 0 38px;
	}

	.chacha-help-layout {
		display: block;
	}

	.chacha-help-sidebar {
		display: none;
	}

	.chacha-help-section {
		scroll-margin-top: 16px;
	}

	.chacha-help-section + .chacha-help-section {
		margin-top: 28px;
	}

	.chacha-help-section__header {
		margin-bottom: 9px;
	}

	.chacha-help-section__header h2 {
		font-size: 28px;
	}

	.chacha-help-section__items {
		gap: 7px;
	}

	.chacha-help-faq {
		border-radius: 7px;
	}

	.chacha-help-faq__summary {
		gap: 14px;
		min-height: 50px;
		padding: 11px 13px;
		font-size: 13px;
		line-height: 1.4;
	}

	.chacha-help-faq__answer {
		padding: 0 38px 13px 13px;
		font-size: 12.5px;
		line-height: 1.6;
	}

	.chacha-help-empty,
	.chacha-help-search-empty {
		padding: 28px 18px;
	}

	.chacha-help-empty h2,
	.chacha-help-search-empty h2 {
		font-size: 28px;
	}

	.chacha-help-contact {
		padding: 26px 0 30px;
	}

	.chacha-help-contact__inner {
		display: block;
	}

	.chacha-help-contact h2 {
		font-size: 28px;
	}

	.chacha-help-contact__cta {
		width: 100%;
		min-height: 44px;
		margin-top: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chacha-help-search,
	.chacha-help-sidebar__nav a,
	.chacha-help-faq__icon::before,
	.chacha-help-faq__icon::after,
	.chacha-help-contact__cta {
		transition: none;
	}
}
