/**
 * Smart Tab Anchor Navigation — Frontend Styles
 * File: assets/css/smart-tab-anchor-nav.css
 */

/* ── Wrapper ─────────────────────────────────── */
.pretpot-stan-wrapper {
	position: relative;
	width: 100%;
}

/* ── Bar ─────────────────────────────────────── */
.pretpot-stan-bar {
	width: 100%;
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;        /* Firefox */
	-ms-overflow-style: none;     /* IE/Edge */
	box-sizing: border-box;
}

.pretpot-stan-bar::-webkit-scrollbar {
	display: none;
}

/* Sticky state (JS-applied) */
.pretpot-stan-bar.pretpot-stan-is-sticky {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 100;
}

/* ── Inner flex row ──────────────────────────── */
.pretpot-stan-inner {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	padding: 0 16px;
	white-space: nowrap;
	width: max-content;
	min-width: 100%;
	box-sizing: border-box;
}

/* ── Buttons (shared) ────────────────────────── */
/* Hard reset — overrides Elementor/theme button defaults */
.pretpot-stan-bar .pretpot-stan-btn,
.pretpot-stan-bar .pretpot-stan-btn:focus,
.pretpot-stan-bar .pretpot-stan-btn:active {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: color 0.2s ease, background-color 0.2s ease;
	text-decoration: none !important;
	color: #6b7280;
	outline: none;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
}

.pretpot-stan-btn-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.pretpot-stan-icon {
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	line-height: 1;
}

.pretpot-stan-icon svg {
	width: 14px;
	height: 14px;
}

/* ══════════════════════════════════════════════
 * TABS STYLE
 * ══════════════════════════════════════════════ */
.pretpot-stan-style-tabs .pretpot-stan-btn,
.pretpot-stan-style-tabs .pretpot-stan-btn:hover,
.pretpot-stan-style-tabs .pretpot-stan-btn:focus,
.pretpot-stan-style-tabs .pretpot-stan-btn:active {
	background: transparent !important;
	background-color: transparent !important;
	border-radius: 0 !important;
	border: none !important;
	box-shadow: none !important;
}

.pretpot-stan-style-tabs .pretpot-stan-btn {
	color: #6b7280;
}

.pretpot-stan-style-tabs .pretpot-stan-btn:hover,
.pretpot-stan-style-tabs .pretpot-stan-btn.pretpot-stan-active {
	color: #2563eb;
}

/* Active indicator line */
.pretpot-stan-line {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: #2563eb;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.pretpot-stan-btn.pretpot-stan-active .pretpot-stan-line {
	opacity: 1;
}

/* Line positions */
.pretpot-stan-line-bottom {
	bottom: 0;
	top: auto;
}

.pretpot-stan-line-top {
	top: 0;
	bottom: auto;
}

/* ══════════════════════════════════════════════
 * PILLS STYLE
 * ══════════════════════════════════════════════ */
.pretpot-stan-style-pills .pretpot-stan-inner {
	padding: 8px 16px;
	gap: 6px;
}

.pretpot-stan-style-pills .pretpot-stan-btn {
	border-radius: 20px;
	background: #f3f4f6;
	color: #374151;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.pretpot-stan-style-pills .pretpot-stan-btn:hover {
	background: #e5e7eb;
}

.pretpot-stan-style-pills .pretpot-stan-btn.pretpot-stan-active {
	background: #2563eb;
	color: #fff;
}

/* Pills don't use the line */
.pretpot-stan-style-pills .pretpot-stan-line {
	display: none;
}

/* ══════════════════════════════════════════════
 * STICKY SPACER
 * (JS inserts a placeholder div to prevent layout jump)
 * ══════════════════════════════════════════════ */
.pretpot-stan-sticky-spacer {
	display: none;
}

.pretpot-stan-sticky-spacer.pretpot-stan-spacer-active {
	display: block;
}

/* ══════════════════════════════════════════════
 * FOCUS / A11Y
 * ══════════════════════════════════════════════ */
.pretpot-stan-btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* ══════════════════════════════════════════════
 * ALIGNMENT
 * ══════════════════════════════════════════════ */
.pretpot-stan-bar.pretpot-stan-align-left   .pretpot-stan-inner { justify-content: flex-start; }
.pretpot-stan-bar.pretpot-stan-align-center .pretpot-stan-inner { justify-content: center; }
.pretpot-stan-bar.pretpot-stan-align-right  .pretpot-stan-inner { justify-content: flex-end; }

/* When tabs overflow (more tabs than bar width) alignment is overridden
   by the scroll — that is intentional and correct. */

/* ══════════════════════════════════════════════
 * ELEMENTOR EDITOR
 * ══════════════════════════════════════════════ */
.elementor-editor-active .pretpot-stan-bar.pretpot-stan-is-sticky {
	position: relative !important;
}