/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* =========================================================================
   FAQ custom element — the FAQ itself only (category tab slider + accordion
   Q&A). No heading/subtitle and no card chrome: wrap it in your own section
   (background, padding, heading) as needed. Styling values taken from the
   native #faq design on tendereurope.enhefaside.dk.
   ========================================================================= */
.brxe-faq {
	--faq-accent:  #E6B400; /* active-tab underline (gold) */
	--faq-ink:     #0D1B4B; /* primary navy text */
	--faq-line:    #DDE5F0; /* hairline separators */
	--faq-muted:   #6B7798; /* inactive tab label */
	--faq-chevron: #C8962A; /* accordion chevron (bronze gold) */

	color: var(--faq-ink);
	font-family: "DM Sans", sans-serif;
}

/* Tabs (category selector) */
.brxe-faq .faq-tabs {
	display: flex;
	flex-direction: column;
}
/* Horizontal slider — tabs never wrap; JS scrolls the active tab to centre. */
.brxe-faq .tab-menu {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 20px;
	border-bottom: 1px solid var(--faq-line);
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
}
.brxe-faq .tab-menu::-webkit-scrollbar {
	display: none; /* Chrome / Safari / Edge */
}
.brxe-faq .tab-title {
	flex: 0 0 auto; /* keep natural width in the slider */
	margin: 0;
	padding: 0 16px 16px;
	font-family: "Schibsted Grotesk", sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 20px;
	white-space: nowrap;
	color: var(--faq-muted);
	border-bottom: 2px solid transparent;
	cursor: pointer;
}
.brxe-faq .tab-title.brx-open {
	font-weight: 700;
	color: var(--faq-ink);
	border-bottom: 2px solid #e6b400;
}

/* Panes — conditional display per selected category */
.brxe-faq .tab-content {
	padding-top: 24px;
}
.brxe-faq .tab-pane {
	display: none;
}
.brxe-faq .tab-pane.brx-open {
	display: block;
}

/* Question & answer list — accordion (each answer rolls out) */
.brxe-faq .faq-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Clickable question row */
.brxe-faq .faq-question-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 22px 0;
	margin-bottom: -1px; /* collapse adjacent hairlines */
	border-bottom: 1px solid var(--faq-line);
	cursor: pointer;
}
.brxe-faq .faq-question {
	margin: 0;
	font-family: "Schibsted Grotesk", sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 28px;
	letter-spacing: 0.35px;
	color: var(--faq-ink);
}
.brxe-faq .faq-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 9px;
	color: var(--faq-chevron);
	transition: transform 0.3s ease;
}
.brxe-faq .faq-item.brx-open .faq-icon {
	transform: rotate(180deg);
}

/* Collapsible answer — outer element animates (no padding, so it fully
   collapses); the inner wrapper carries padding, width and typography. */
.brxe-faq .faq-answer {
	overflow: hidden;
	max-height: 0; /* JS animates this open/closed */
	transition: max-height 0.3s ease;
}
.brxe-faq .faq-answer[hidden] {
	display: none; /* pre-JS server-rendered state */
}
.brxe-faq .faq-answer-inner {
	max-width: 800px;
	padding-top: 14px;
	padding-bottom: 22px;
	font-family: "DM Sans", sans-serif;
	font-size: 16px;
	line-height: 26px;
	color: var(--faq-ink);
}
.brxe-faq .faq-answer-inner > :first-child {
	margin-top: 0;
}
.brxe-faq .faq-answer-inner > :last-child {
	margin-bottom: 0;
}

/* =========================================================================
   Language switcher — active flag as a 30×30 circle with a pure-CSS hover
   dropdown of the other languages (also opens on keyboard focus). No JS.
   ========================================================================= */
.brxe-language-switcher {
	--lang-flag-size: 30px;
	--lang-gap:       8px;

	position: relative;
	display: inline-block;
	line-height: 0;
}

/* Circular flag (used for both the trigger and the dropdown links) */
.brxe-language-switcher .lang-flag {
	width: var(--lang-flag-size);
	height: var(--lang-flag-size);
	/* override Bricks' global img{max-width:100%}, which otherwise collapses the
	   flag to 0 width inside the shrink-to-fit absolutely-positioned dropdown */
	max-width: none;
	min-width: var(--lang-flag-size);
	flex: 0 0 auto;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Trigger = the active language */
.brxe-language-switcher .lang-current {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	line-height: 0;
	border-radius: 50%;
}
.brxe-language-switcher .lang-current:hover .lang-flag,
.brxe-language-switcher .lang-link:hover .lang-flag,
.brxe-language-switcher .lang-current:focus-visible .lang-flag,
.brxe-language-switcher .lang-link:focus-visible .lang-flag {
	box-shadow: 0 0 0 2px rgba(13, 27, 75, 0.15);
}

/* Dropdown panel */
.brxe-language-switcher .lang-dropdown {
	position: absolute;
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	margin: 0;
	padding: var(--lang-gap);
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--lang-gap);

	background: rgba(74, 85, 112, 0.3);
	border-radius: 999px;

	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 100;
}

/* Direction: down (default) vs up */
.brxe-language-switcher.lang-drop-down  .lang-dropdown { top: 100%; }
.brxe-language-switcher.lang-drop-up    .lang-dropdown {
	bottom: 100%;
	transform: translateX(-50%) translateY(-6px);
}

/* Invisible bridge so the pointer can cross the gap without closing */
.brxe-language-switcher .lang-dropdown::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: calc(var(--lang-gap) + 6px);
}
.brxe-language-switcher.lang-drop-down .lang-dropdown::before { bottom: 100%; }
.brxe-language-switcher.lang-drop-up   .lang-dropdown::before { top: 100%; }

/* Reveal on hover / keyboard focus */
.brxe-language-switcher:hover .lang-dropdown,
.brxe-language-switcher:focus-within .lang-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.brxe-language-switcher .lang-link {
	display: block;
	line-height: 0;
	border-radius: 50%;
}