/**
 * BBP FAQ widget styles.
 *
 * Deliberately has NO hardcoded outer padding of its own: Elementor's
 * native Advanced > Padding control (which targets
 * .elementor-widget-container) is the only source of outer spacing.
 *
 * Visual treatment (item background, toggle icon, answer collapse) is
 * unchanged from the FAQ Accordion variant this replaced in
 * BBP Repeater Grid — only the class names changed, to this widget's own
 * dedicated .bbp-faq-* scheme.
 */

.elementor-widget-bbp-faq {
	width: 100%;
}

.bbp-faq-section {
	width: 100%;
}

.bbp-faq-heading {
	font-family: var(--bbp-heading-font);
	font-weight: 400;
	font-size: 40px;
	line-height: 1.2;
	color: var(--bbp-text-white);
	text-transform: uppercase;
	text-align: center;
	margin: 0 0 40px;
}

.bbp-faq-heading .bbp-text-gold {
	color: var(--bbp-gold);
}

.bbp-faq-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 1040px;
	margin: 0 auto;
}

.bbp-faq-item {
	background: rgba(132, 132, 132, 0.14);
	border-radius: 20px;
	padding: 22px 28px;
	overflow: hidden;
}

.bbp-faq-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-align: left;
	outline: none;
	/* The parent theme's reset.css sets `white-space: nowrap` on every
	   plain <button>. That's an inherited property, so without this
	   override it cascades into .bbp-faq-question below and stops the
	   question text from ever wrapping, overflowing the card on narrow
	   screens instead. */
	white-space: normal;
}

/*
 * Some global button styles (theme/browser defaults) add a colored
 * hover/focus background to plain <button> elements. Force it back off
 * here so the toggle never shows anything but its own transparent state.
 */
.bbp-faq-toggle:hover,
.bbp-faq-toggle:focus,
.bbp-faq-toggle:focus-visible,
.bbp-faq-toggle:active {
	background: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.bbp-faq-question {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: break-word;
	font-family: var(--bbp-font-family);
	font-weight: 700;
	font-size: 18px;
	color: var(--bbp-text-white);
}

.bbp-faq-toggle:hover .bbp-faq-question,
.bbp-faq-toggle:focus .bbp-faq-question,
.bbp-faq-toggle:active .bbp-faq-question {
	color: var(--bbp-text-white) !important;
}

.bbp-faq-icon {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--bbp-gold);
	position: relative;
}

.bbp-faq-icon::before,
.bbp-faq-icon::after {
	content: "";
	position: absolute;
	background: #000;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.bbp-faq-icon::before {
	width: 14px;
	height: 2px;
}

.bbp-faq-icon::after {
	width: 2px;
	height: 14px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.bbp-faq-toggle[aria-expanded="true"] .bbp-faq-icon::after {
	opacity: 0;
	transform: translate(-50%, -50%) rotate(90deg);
}

.bbp-faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.bbp-faq-answer p {
	font-family: var(--bbp-font-family);
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.8);
	margin: 16px 0 0;
}

.bbp-faq-answer p:first-child {
	margin-top: 16px;
}

@media (max-width: 600px) {
	.bbp-faq-heading {
		font-size: 30px;
	}

	.bbp-faq-item {
		padding: 18px 20px;
	}
}
