/* ================================================================
   Blaek Tablaschen Widget
   ================================================================ */

/* --- Root layout ------------------------------------------------ */
.blaek-tablaschen {
	display: flex;
	flex-direction: column;
}

/* --- Tab navigation bar ----------------------------------------- */
.blaek-tablaschen__nav {
	display: flex;
	align-items: stretch;
	flex-wrap: nowrap;
	/* overflow:hidden during initial load prevents tabs flashing at full width.
	   JS adds .is-ready after the first measureOverflow() + updateCover() run,
	   which removes the clip so the dropdown can escape the nav. */
	overflow: hidden;
	/* No z-index here — setting one would create a stacking context that
	   traps the dropdown below the container (z-index:2). Without z-index,
	   the dropdown's own z-index:9999 is evaluated in the same context as
	   the container and wins. The active-cover still works because it lives
	   inside the container which paints above the plain-flow nav. */
	position: relative;
}

.blaek-tablaschen__nav.is-ready {
	overflow: visible;
}

.blaek-tablaschen__tabs-track {
	display: flex;
	flex-wrap: nowrap;
	overflow-y: visible;
	flex: 0 0 auto;
}

/* --- Individual tab button -------------------------------------- */
.blaek-tablaschen__tab {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	border: none;
	background-color: rgba(110, 120, 130, 0.29);
	color: #333333;
	padding: 20px;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	line-height: 1.4;
	transition: background-color 0.15s ease, color 0.15s ease;
	flex-shrink: 0;
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
	border-radius: 0;
	/* hidden tabs get visibility:hidden via JS but keep their layout space;
	   tabs that overflow are marked data-hidden and get display:none */
}

.blaek-tablaschen__tab.is-active {
	background-color: rgba(255, 255, 255, 0.7);
	color: #333333;
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
}

.blaek-tablaschen__tab:hover:not(.is-active) {
	background-color: rgba(0, 0, 0, 0.06);
}

.blaek-tablaschen__tab:focus-visible {
	outline: 2px solid #14466e;
	outline-offset: -2px;
	position: relative;
	z-index: 1;
}

/* --- "More" (ellipsis) button ----------------------------------- */
.blaek-tablaschen__more {
	position: relative;
	flex-shrink: 0;
	display: none; /* shown via JS when overflow occurs */
}

.blaek-tablaschen__more.is-visible {
	display: flex;
	align-items: stretch;
}

.blaek-tablaschen__more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	border: none;
	border-radius: 0 !important;
	background-color: rgba(110, 120, 130, 0.29);
	color: #333333;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	transition: background-color 0.15s ease;
	white-space: nowrap;
}

.blaek-tablaschen__more-btn:hover,
.blaek-tablaschen__more-btn:focus {
	color: #fff;
	background-color: #0f2064;
}

.blaek-tablaschen__more-btn.is-open {
	background-color: rgba(0, 0, 0, 0.06);
}

.blaek-tablaschen__more-btn:focus-visible {
	outline: 2px solid #14466e;
	outline-offset: -2px;
	color: #fff;
	background-color: #0f2064;
}

.blaek-tablaschen__more-dots {
	font-size: 1.2em;
	line-height: 1;
	letter-spacing: 0.05em;
}

/* Active-indicator on the more-btn when selected tab is hidden */
.blaek-tablaschen__more-btn.has-active-hidden {
	background-color: #d8d8d8;
}

/* --- Dropdown --------------------------------------------------- */
.blaek-tablaschen__dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 5px);
	right: 0;
	min-width: 180px;
	background-color: #ffffff;
	border: 1px solid #d8d8d8;
	list-style: none;
	margin: 0;
	z-index: 9;
	padding: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Toggle is on the $more parent — avoids any class-on-child specificity fights */
.blaek-tablaschen__more.is-open .blaek-tablaschen__dropdown {
	display: block;
}

.blaek-tablaschen__dropdown-item {
	margin: 0;
	padding: 0;
}

.blaek-tablaschen__dropdown-btn {
	display: block;
	width: 100%;
	text-align: left;
	padding: 10px 16px;
	border: none;
	border-radius: 0 !important;
	background: none;
	color: #333333;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	white-space: nowrap;
	transition: background-color 0.12s ease;
}

.blaek-tablaschen__dropdown-btn:hover {
	background-color: #0f2064;
	color: #ffffff;
}

.blaek-tablaschen__dropdown-btn.is-active {
	background-color: #d8d8d8;
	font-weight: 600;
}

/* --- Container / border wrapper --------------------------------- */
.blaek-tablaschen__container {
	position: relative;
	z-index: 2;
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
}

/* --- Active-tab shadow cover ------------------------------------ */
/* A JS-positioned white div that sits above the container top edge,
   exactly under the active tab, hiding the shadow seam.
   Its left + width are set dynamically to match the active tab. */
.blaek-tablaschen__active-cover {
	position: absolute;
	top: -30px;       /* overridden by JS to match real tab height */
	height: 30px;     /* overridden by JS to match real tab height */
	background-color: #ffffff;
	pointer-events: none;
	left: 0;
	width: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
	white-space: nowrap;
	font-size: inherit;
	font-family: inherit;
	line-height: 1.4;
	box-sizing: border-box;
}

/* --- Content area ----------------------------------------------- */
.blaek-tablaschen__content-area {
	background-color: #ffffff;
}

/* --- Individual panel ------------------------------------------- */
.blaek-tablaschen__panel {
	padding: 60px;
}

.blaek-tablaschen__panel[hidden] {
	display: none;
}

.blaek-tablaschen__panel.is-active {
	display: block;
}

/* --- Title ----------------------------------------------------- */
.blaek-tablaschen__title {
	color: #14466e;
	margin-top: 0;
	margin-bottom: 20px;
}

/* --- Content text ---------------------------------------------- */
.blaek-tablaschen__content > *:first-child {
	margin-top: 0;
}

.blaek-tablaschen__content > *:last-child {
	margin-bottom: 0;
}
