/**
 * WooCommerce Category Content for Elementor - front-end styles.
 *
 * Every value here is a starting point; all of it is overridable from the
 * Elementor Style tab of each widget.
 */

/* Hide Elementor's container when a widget renders nothing at all. */
.elementor-widget-wccc-category-heading > .elementor-widget-container:empty,
.elementor-widget-wccc-category-text > .elementor-widget-container:empty,
.elementor-widget-wccc-category-content > .elementor-widget-container:empty,
.elementor-widget-wccc-category-faqs > .elementor-widget-container:empty,
.elementor-widget-wccc-category-links > .elementor-widget-container:empty {
	display: none;
}

/* -------------------------------------------------- Heading widget */

.wccc-heading {
	margin: 0 0 0.5em;
}

/* -------------------------------------------------- Content widget */

.wccc-content > *:first-child {
	margin-top: 0;
}

.wccc-content > *:last-child {
	margin-bottom: 0;
}

.wccc-content ul,
.wccc-content ol {
	margin-left: 1.25em;
	padding-left: 0.75em;
}

.wccc-dropcap-yes .wccc-content > p:first-of-type::first-letter {
	float: left;
	font-size: 3.2em;
	font-weight: 700;
	line-height: 0.85;
	margin: 0.05em 0.12em 0 0;
}

/* -------------------------------------------------- FAQ widget */

.wccc-faqs {
	margin: 0;
}

.wccc-faqs__heading {
	margin: 0 0 0.75em;
}

.wccc-faq__item {
	background-color: transparent;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 4px;
	margin-bottom: 0.75em;
	overflow: hidden;
}

.wccc-faq__item:last-child {
	margin-bottom: 0;
}

/* The heading tag exists for document outline only. */
.wccc-faq__title {
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	margin: 0;
	padding: 0;
	text-transform: inherit;
}

.wccc-faq__question {
	-webkit-appearance: none;
	appearance: none;
	align-items: center;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	display: flex;
	font: inherit;
	gap: 1em;
	justify-content: space-between;
	line-height: 1.4;
	margin: 0;
	padding: 1em 1.25em;
	text-align: left;
	text-transform: inherit;
	width: 100%;
}

.wccc-faq__question:hover,
.wccc-faq__question:focus {
	background: none;
}

.wccc-faq__question:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.wccc-faq__question-text {
	flex: 1 1 auto;
}

.wccc-faq--icon-pos-left .wccc-faq__question {
	flex-direction: row-reverse;
	justify-content: flex-end;
}

.wccc-faq__icon {
	flex: 0 0 auto;
	height: 14px;
	position: relative;
	width: 14px;
}

/* Plus / minus */
.wccc-faq--icon-plus .wccc-faq__icon::before,
.wccc-faq--icon-plus .wccc-faq__icon::after {
	background-color: currentColor;
	content: "";
	position: absolute;
	transition: transform 0.2s ease;
}

.wccc-faq--icon-plus .wccc-faq__icon::before {
	height: 2px;
	left: 0;
	margin-top: -1px;
	top: 50%;
	width: 100%;
}

.wccc-faq--icon-plus .wccc-faq__icon::after {
	height: 100%;
	left: 50%;
	margin-left: -1px;
	top: 0;
	width: 2px;
}

.wccc-faq--icon-plus .wccc-faq__item.is-open .wccc-faq__icon::after {
	transform: rotate(90deg);
}

/* Chevron */
.wccc-faq--icon-chevron .wccc-faq__icon::before {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	height: 60%;
	left: 15%;
	position: absolute;
	top: 10%;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	width: 60%;
}

.wccc-faq--icon-chevron .wccc-faq__item.is-open .wccc-faq__icon::before {
	transform: rotate(-135deg);
}

/*
 * Answers start collapsed so there is no flash of open content before the
 * script runs. A <noscript> rule in the markup re-opens them when JavaScript is
 * unavailable. The text is always present in the HTML source for crawlers.
 */
.wccc-faq__answer {
	display: none;
	padding: 0 1.25em 1.25em;
}

.wccc-faq__item.is-open .wccc-faq__answer {
	display: block;
}

.wccc-faq__answer > *:first-child {
	margin-top: 0;
}

.wccc-faq__answer > *:last-child {
	margin-bottom: 0;
}

.wccc-faq__answer ul,
.wccc-faq__answer ol {
	margin-left: 1.25em;
	padding-left: 0.75em;
}

/* -------------------------------------------------- Internal links widget */

/*
 * The whole block is driven by five custom properties, so recolouring it is a
 * one-line change. The Elementor "Colors" section writes to exactly these.
 */
.wccc-links {
	--wccc-accent: #b8912f;
	--wccc-surface: #faf7f0;
	--wccc-surface-hover: #f4ece0;
	--wccc-border: rgba(26, 22, 15, 0.1);
	--wccc-muted: #7a736a;
}

/* Eyebrow-style heading with a rule running to the edge. */
.wccc-links__heading {
	align-items: center;
	color: var(--wccc-accent);
	display: flex;
	gap: 0.6em;
	margin: 0 0 1.1em;
}

.wccc-links__heading-text {
	flex: 0 0 auto;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.wccc-links__heading--rule::after {
	background: linear-gradient(to right, var(--wccc-border), transparent);
	content: "";
	flex: 1 1 auto;
	height: 1px;
	min-width: 2em;
}

.wccc-links__icon {
	align-items: center;
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 1;
}

.wccc-links__icon svg {
	height: 1em;
	width: 1em;
}

.wccc-links__list {
	display: grid;
	gap: 0.65em;
	grid-template-columns: minmax(0, 1fr);
	list-style: none;
	margin: 0;
	padding: 0;
}

.wccc-links__item {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wccc-links__item::before,
.wccc-links__item::marker {
	content: none;
}

.wccc-links__link {
	align-items: center;
	color: inherit;
	display: flex;
	gap: 1em;
	justify-content: space-between;
	position: relative;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wccc-links__link:focus-visible {
	outline: 2px solid var(--wccc-accent);
	outline-offset: 2px;
}

.wccc-links__text {
	min-width: 0;
}

.wccc-links__label {
	display: block;
	font-weight: 600;
	line-height: 1.35;
}

.wccc-links__url {
	color: var(--wccc-muted);
	display: block;
	font-size: 0.82em;
	margin-top: 0.2em;
	overflow-wrap: anywhere;
}

.wccc-links__arrow {
	color: var(--wccc-accent);
	flex: 0 0 auto;
	line-height: 1;
	transition: transform 0.18s ease;
}

.wccc-links__arrow svg {
	height: 1em;
	width: 1em;
}

.wccc-links--slide .wccc-links__link:hover .wccc-links__arrow,
.wccc-links--slide .wccc-links__link:focus .wccc-links__arrow {
	transform: translateX(4px);
}

/* ---------- Layout: Cards (default) ---------- */

.wccc-links--cards .wccc-links__link {
	background-color: var(--wccc-surface);
	border: 1px solid var(--wccc-border);
	border-radius: 6px;
	overflow: hidden;
	padding: 0.95em 1.15em;
}

/* Gold spine that wipes in from the left on hover. */
.wccc-links--cards .wccc-links__link::before {
	background-color: var(--wccc-accent);
	bottom: 0;
	content: "";
	left: 0;
	position: absolute;
	top: 0;
	transform: scaleY(0);
	transition: transform 0.18s ease;
	width: 3px;
}

.wccc-links--cards .wccc-links__link:hover,
.wccc-links--cards .wccc-links__link:focus {
	background-color: var(--wccc-surface-hover);
	border-color: var(--wccc-accent);
}

.wccc-links--cards .wccc-links__link:hover::before,
.wccc-links--cards .wccc-links__link:focus::before {
	transform: scaleY(1);
}

/* ---------- Layout: Minimal list ---------- */

.wccc-links--minimal .wccc-links__list {
	gap: 0.2em;
}

.wccc-links--minimal .wccc-links__link {
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 0.6em;
	padding: 0.45em 0;
}

.wccc-links--minimal .wccc-links__link:hover .wccc-links__label,
.wccc-links--minimal .wccc-links__link:focus .wccc-links__label {
	color: var(--wccc-accent);
}

/* ---------- Layout: Pills ---------- */

.wccc-links--pills .wccc-links__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55em;
}

.wccc-links--pills .wccc-links__link {
	background-color: var(--wccc-surface);
	border: 1px solid var(--wccc-border);
	border-radius: 999px;
	gap: 0.5em;
	padding: 0.5em 1.05em;
}

.wccc-links--pills .wccc-links__link:hover,
.wccc-links--pills .wccc-links__link:focus {
	background-color: var(--wccc-surface-hover);
	border-color: var(--wccc-accent);
}

.wccc-links--pills .wccc-links__label {
	font-size: 0.95em;
}

.wccc-links--pills .wccc-links__url {
	display: none;
}

/* ---------- Layout: Boxed list ---------- */

.wccc-links--boxed {
	background-color: var(--wccc-surface);
	border: 1px solid var(--wccc-border);
	border-radius: 8px;
	padding: 1.35em 1.6em;
}

.wccc-links--boxed .wccc-links__list {
	gap: 0;
}

.wccc-links--boxed .wccc-links__link {
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 0.65em;
	padding: 0.6em 0;
}

.wccc-links--boxed .wccc-links__item + .wccc-links__item .wccc-links__link {
	border-top: 1px solid var(--wccc-border);
}

.wccc-links--boxed .wccc-links__link:hover .wccc-links__label,
.wccc-links--boxed .wccc-links__link:focus .wccc-links__label {
	color: var(--wccc-accent);
}

/* -------------------------------------------------- Editor helpers */

.wccc-placeholder {
	background-color: rgba(0, 0, 0, 0.03);
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	color: #6b6b6b;
	font-size: 13px;
	line-height: 1.5;
	padding: 1em 1.25em;
}

/* -------------------------------------------------- Responsive / motion */

@media (max-width: 767px) {
	.wccc-faq__question {
		gap: 0.75em;
		padding: 0.85em 1em;
	}

	.wccc-faq__answer {
		padding: 0 1em 1em;
	}

	.wccc-links__list {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wccc-faq__icon::before,
	.wccc-faq__icon::after,
	.wccc-links__link,
	.wccc-links__arrow,
	.wccc-links__link::before {
		transition: none;
	}

	.wccc-links--slide .wccc-links__link:hover .wccc-links__arrow {
		transform: none;
	}
}
