/**
 * FAQ help center modal — light theme.
 * Brand accent: #ffc000
 */
.cl-faq-modal {
	--cl-faq-yellow: #ffc000;
	--cl-faq-yellow-soft: rgba(255, 192, 0, 0.12);
	--cl-faq-yellow-border: rgba(255, 192, 0, 0.4);

	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	font-family: 'Raleway', 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* Beat parent theme global `button` / hover black styles. */
.cl-faq-modal button {
	font-family: inherit;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: inherit;
	cursor: pointer;
}

.cl-faq-modal button:hover,
.cl-faq-modal button:focus,
.cl-faq-modal button:focus-visible,
.cl-faq-modal button:active {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: inherit !important;
	outline: none;
}

@media (min-width: 640px) {
	.cl-faq-modal {
		align-items: center;
		padding: 1rem;
	}
}

.cl-faq-modal[hidden] {
	display: none !important;
}

.cl-faq-modal.is-open {
	display: flex;
}

.cl-faq-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: cl-faq-fade-in 0.2s ease;
}

.cl-faq-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: 92vh;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 1rem 1rem 0 0;
	box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
	overflow: hidden;
	animation: cl-faq-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
	.cl-faq-modal__panel {
		max-width: 42rem;
		max-height: min(88vh, 780px);
		border-radius: 1rem;
		animation: cl-faq-scale-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	}
}

@media (min-width: 1024px) {
	.cl-faq-modal__panel {
		max-width: 48rem;
	}
}

@keyframes cl-faq-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes cl-faq-slide-up {
	from { opacity: 0; transform: translateY(2.5rem) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cl-faq-scale-in {
	from { opacity: 0; transform: scale(0.96) translateY(0.5rem); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header ── */
.cl-faq-modal__header {
	position: relative;
	flex-shrink: 0;
	overflow: hidden;
	padding: 1.25rem 1.25rem 1rem;
	background: #fafafa;
}

@media (min-width: 640px) {
	.cl-faq-modal__header {
		padding: 1.5rem 1.5rem 1rem;
	}
}

.cl-faq-modal__header-glow {
	position: absolute;
	width: 12rem;
	height: 12rem;
	border-radius: 9999px;
	filter: blur(48px);
	pointer-events: none;
}

.cl-faq-modal__header-glow--left {
	top: -4rem;
	left: -2.5rem;
	background: rgba(255, 192, 0, 0.2);
}

.cl-faq-modal__header-glow--right {
	top: -2rem;
	right: -2.5rem;
	background: rgba(255, 192, 0, 0.14);
}

.cl-faq-modal__header-top {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.cl-faq-modal__title-wrap {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.cl-faq-modal__title-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.75rem;
	background: var(--cl-faq-yellow-soft);
	border: 1px solid var(--cl-faq-yellow-border);
	color: #b45309;
}

.cl-faq-modal__title-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.cl-faq-modal__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	color: #111827;
	line-height: 1.25;
}

@media (min-width: 640px) {
	.cl-faq-modal__title {
		font-size: 1.5rem;
	}
}

.cl-faq-modal__title span {
	color: var(--cl-faq-yellow);
}

.cl-faq-modal__meta {
	margin: 0.125rem 0 0;
	font-size: 0.75rem;
	font-weight: 500;
	color: #6b7280;
}

.cl-faq-modal__close {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	border: none !important;
	border-radius: 0.75rem !important;
	background: transparent !important;
	color: #6b7280 !important;
	cursor: pointer;
	transition: color 0.2s, background-color 0.2s;
}

.cl-faq-modal__close:hover,
.cl-faq-modal__close:focus {
	color: #111827 !important;
	background: #f3f4f6 !important;
	border: none !important;
}

.cl-faq-modal__close svg {
	width: 1.25rem;
	height: 1.25rem;
}

.cl-faq-modal__toolbar {
	display: flex;
	gap: 0.5rem;
}

.cl-faq-modal__category-wrap {
	position: relative;
	flex-shrink: 0;
	width: 9.5rem;
}

@media (min-width: 640px) {
	.cl-faq-modal__category-wrap {
		width: 10.5rem;
	}
}

.cl-faq-modal__category {
	width: 100%;
	appearance: none;
	padding: 0.625rem 2rem 0.625rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 0.75rem;
	outline: none;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 640px) {
	.cl-faq-modal__category {
		font-size: 0.875rem;
	}
}

.cl-faq-modal__category:focus {
	border-color: var(--cl-faq-yellow);
	box-shadow: 0 0 0 2px rgba(255, 192, 0, 0.3);
}

.cl-faq-modal__category-chevron {
	position: absolute;
	right: 0.625rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	color: #9ca3af;
	pointer-events: none;
}

.cl-faq-modal__search-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.cl-faq-modal__search-icon {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	color: #9ca3af;
	pointer-events: none;
}

.cl-faq-modal__search {
	width: 100%;
	padding: 0.625rem 2.25rem 0.625rem 2.5rem;
	font-size: 0.875rem;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 0.75rem;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.cl-faq-modal__search::placeholder {
	color: #9ca3af;
}

.cl-faq-modal__search:focus {
	border-color: var(--cl-faq-yellow);
	box-shadow: 0 0 0 2px rgba(255, 192, 0, 0.3);
}

.cl-faq-modal__search-clear {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	padding: 0.25rem;
	border: none !important;
	background: transparent !important;
	color: #9ca3af !important;
	cursor: pointer;
}

.cl-faq-modal__search-clear:hover,
.cl-faq-modal__search-clear:focus {
	color: #4b5563 !important;
	background: transparent !important;
	border: none !important;
}

.cl-faq-modal__search-clear svg {
	width: 1rem;
	height: 1rem;
}

.cl-faq-modal__accent {
	height: 1px;
	margin-top: 1rem;
	background: linear-gradient(to right, transparent, rgba(255, 192, 0, 0.65), transparent);
}

/* ── Body ── */
.cl-faq-modal__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 1rem 1rem 0.5rem;
	background: #ffffff;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
	.cl-faq-modal__body {
		padding: 1rem 1.5rem 0.5rem;
	}
}

.cl-faq-modal__state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 4rem 1rem;
	text-align: center;
	color: #6b7280;
	font-size: 0.875rem;
	font-weight: 500;
}

.cl-faq-modal__spinner {
	width: 2rem;
	height: 2rem;
	color: var(--cl-faq-yellow);
	animation: cl-faq-spin 0.8s linear infinite;
}

@keyframes cl-faq-spin {
	to { transform: rotate(360deg); }
}

.cl-faq-modal__state--error svg {
	width: 2.5rem;
	height: 2.5rem;
	color: var(--cl-faq-yellow);
}

.cl-faq-modal__retry {
	padding: 0.625rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 700;
	font-family: inherit;
	color: #000 !important;
	background: var(--cl-faq-yellow) !important;
	border: none !important;
	border-radius: 9999px;
	cursor: pointer;
	transition: background-color 0.2s, filter 0.2s;
}

.cl-faq-modal__retry:hover,
.cl-faq-modal__retry:focus {
	background: #ffd24d !important;
	color: #000 !important;
}

.cl-faq-modal__search-info {
	margin: 0 0 1rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: #6b7280;
}

.cl-faq-modal__category-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e5e7eb;
}

.cl-faq-modal__category-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0.5rem;
	background: var(--cl-faq-yellow-soft);
	border: 1px solid var(--cl-faq-yellow-border);
	color: #b45309;
	overflow: hidden;
}

.cl-faq-modal__category-icon img {
	width: 1.75rem;
	height: 1.75rem;
	object-fit: contain;
}

.cl-faq-modal__category-icon svg {
	width: 1rem;
	height: 1rem;
}

.cl-faq-modal__category-head h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.25;
}

.cl-faq-modal__category-count {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 500;
	color: #6b7280;
}

.cl-faq-modal__items {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding-bottom: 0.5rem;
}

/* ── Accordion ── */
.cl-faq-modal__item {
	border-radius: 0.75rem;
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	overflow: hidden;
	transition: border-color 0.2s, background-color 0.2s;
}

.cl-faq-modal__item:hover {
	border-color: #d1d5db;
	background: #f3f4f6;
}

.cl-faq-modal__item.is-open {
	border-color: var(--cl-faq-yellow);
	background: rgba(255, 192, 0, 0.08);
}

.cl-faq-modal__item-toggle {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	padding: 0.875rem 1rem;
	text-align: left;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: inherit !important;
	font-family: inherit;
	cursor: pointer;
}

.cl-faq-modal__item-toggle:hover,
.cl-faq-modal__item-toggle:focus,
.cl-faq-modal__item-toggle:focus-visible,
.cl-faq-modal__item-toggle:active {
	background: transparent !important;
	border: none !important;
	color: inherit !important;
}

.cl-faq-modal__item.is-open .cl-faq-modal__item-toggle,
.cl-faq-modal__item.is-open .cl-faq-modal__item-toggle:hover,
.cl-faq-modal__item.is-open .cl-faq-modal__item-toggle:focus {
	background: rgba(255, 192, 0, 0.1) !important;
	color: inherit !important;
}

@media (min-width: 640px) {
	.cl-faq-modal__item-toggle {
		padding: 1rem 1.25rem;
	}
}

.cl-faq-modal__item-label {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #9ca3af;
	margin-bottom: 0.25rem;
}

.cl-faq-modal__item-question {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: #1f2937;
	transition: color 0.2s;
}

@media (min-width: 640px) {
	.cl-faq-modal__item-question {
		font-size: 0.9375rem;
	}
}

.cl-faq-modal__item.is-open .cl-faq-modal__item-question {
	color: #111827;
}

.cl-faq-modal__item-chevron {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.125rem;
	color: #9ca3af;
	transition: transform 0.2s, color 0.2s;
}

.cl-faq-modal__item.is-open .cl-faq-modal__item-chevron {
	transform: rotate(180deg);
	color: var(--cl-faq-yellow);
}

.cl-faq-modal__item-answer {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height 0.28s ease, opacity 0.22s ease;
}

.cl-faq-modal__item.is-open .cl-faq-modal__item-answer {
	opacity: 1;
}

.cl-faq-modal__item-answer-inner {
	padding: 0 1rem 0.875rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: #4b5563;
}

.cl-faq-modal__item-answer-prose .wp-block-group,
.cl-faq-modal__item-answer-prose .wp-block-columns,
.cl-faq-modal__item-answer-prose .entry-content,
.cl-faq-modal__item-answer-prose .betterdocs-content,
.cl-faq-modal__item-answer-prose .betterdocs-faq-answer {
	margin: 0;
	padding: 0;
	background: transparent !important;
	border: 0;
	box-shadow: none !important;
}

.cl-faq-modal__item-answer-prose,
.cl-faq-modal__item-answer-prose *:not(a) {
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: #4b5563 !important;
}

.cl-faq-modal__item-answer-prose a {
	color: #a16207 !important;
}

.cl-faq-modal__item-answer-prose strong,
.cl-faq-modal__item-answer-prose b {
	color: #1f2937 !important;
	font-weight: 600;
}

.cl-faq-modal__item-answer-prose h1,
.cl-faq-modal__item-answer-prose h2,
.cl-faq-modal__item-answer-prose h3,
.cl-faq-modal__item-answer-prose h4 {
	color: #111827 !important;
}

@media (min-width: 640px) {
	.cl-faq-modal__item-answer-inner {
		padding: 0 1.25rem 1rem;
	}
}

.cl-faq-modal__item-answer-inner p {
	margin: 0 0 0.5rem;
}

.cl-faq-modal__item-answer-inner p:last-child {
	margin-bottom: 0;
}

.cl-faq-modal__item-answer-inner ul,
.cl-faq-modal__item-answer-inner ol {
	margin: 0.5rem 0 0.75rem;
	padding-left: 1.5rem;
}

.cl-faq-modal__item-answer-inner ul {
	list-style-type: disc;
	list-style-position: outside;
}

.cl-faq-modal__item-answer-inner ol {
	list-style-type: decimal;
	list-style-position: outside;
}

.cl-faq-modal__item-answer-inner li {
	display: list-item;
	margin-bottom: 0.35rem;
}

.cl-faq-modal__item-answer-inner li::marker {
	color: #9ca3af !important;
}

.cl-faq-modal__item-answer-inner ul ul,
.cl-faq-modal__item-answer-inner ol ol,
.cl-faq-modal__item-answer-inner ul ol,
.cl-faq-modal__item-answer-inner ol ul {
	margin-top: 0.35rem;
	margin-bottom: 0.35rem;
}

.cl-faq-modal__item-answer-inner strong,
.cl-faq-modal__item-answer-inner b {
	color: #1f2937 !important;
	font-weight: 600;
}

.cl-faq-modal__item-answer-inner a {
	color: #a16207 !important;
}

/* ── Footer ── */
.cl-faq-modal__footer {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem;
	border-top: 1px solid #e5e7eb;
	background: #f9fafb;
}

@media (min-width: 640px) {
	.cl-faq-modal__footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 1rem 1.5rem;
	}
}

.cl-faq-modal__footer-text {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-width: 0;
}

.cl-faq-modal__footer-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	background: var(--cl-faq-yellow-soft);
	border: 1px solid var(--cl-faq-yellow-border);
	color: #b45309;
}

.cl-faq-modal__footer-icon svg {
	width: 1rem;
	height: 1rem;
}

.cl-faq-modal__footer-text p {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #6b7280;
}

.cl-faq-modal__footer-actions {
	display: flex;
	flex-shrink: 0;
	gap: 0.5rem;
}

.cl-faq-modal__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.5rem 1rem;
	font-size: 0.75rem;
	font-weight: 700;
	font-family: inherit;
	text-decoration: none;
	border-radius: 9999px;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.cl-faq-modal__btn svg {
	width: 0.875rem;
	height: 0.875rem;
}

.cl-faq-modal__btn--primary {
	background: var(--cl-faq-yellow);
	color: #000;
	border: 1px solid var(--cl-faq-yellow);
}

.cl-faq-modal__btn--primary:hover {
	background: #ffd24d;
	color: #000;
}

.cl-faq-modal__btn--ghost {
	background: #ffffff;
	color: #374151;
	border: 1px solid #d1d5db;
}

.cl-faq-modal__btn--ghost:hover {
	color: #111827;
	border-color: #9ca3af;
	background: #f3f4f6;
}
