/**
 * Table of Contents Styles
 * Shared styles for TOC navigation across single page templates
 */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

/* ============================================
   TOC Container
   ============================================ */
.euro-toc-wrapper {
	font-family: 'Roboto', sans-serif;
	margin: 30px 0;
}

.euro-toc-container {
	background: #F8F9FA;
	border-radius: 8px;
	padding: 20px;
	border-left: 4px solid #0B4F9F;
}

/* ============================================
   TOC Header
   ============================================ */
.euro-toc-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	cursor: pointer;
}

.euro-toc-title {
	font-size: 16px;
	font-weight: 700;
	color: #0B4F9F;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.euro-toc-icon {
	width: 20px;
	height: 20px;
	fill: #0B4F9F;
}

.euro-toc-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: #0B4F9F;
	transition: transform 0.3s ease;
}

.euro-toc-toggle svg {
	width: 20px;
	height: 20px;
	transition: transform 0.3s ease;
}

.euro-toc-toggle.collapsed svg {
	transform: rotate(-90deg);
}

/* ============================================
   TOC Navigation List
   ============================================ */
.euro-toc-nav {
	display: block;
	transition: max-height 0.3s ease, opacity 0.3s ease;
	overflow: hidden;
}

.euro-toc-nav.collapsed {
	max-height: 0;
	opacity: 0;
}

.euro-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.euro-toc-item {
	margin: 0;
	padding: 0;
}

.euro-toc-link {
	display: block;
	padding: 10px 15px;
	color: #35393D;
	text-decoration: none;
	font-size: 14px;
	font-weight: 400;
	border-radius: 4px;
	transition: all 0.2s ease;
	position: relative;
	padding-left: 25px;
}

.euro-toc-link::before {
	content: '';
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #6C757D;
	transition: all 0.2s ease;
}

.euro-toc-link:hover {
	background: #E9ECEF;
	color: #0B4F9F;
	padding-left: 30px;
}

.euro-toc-link:hover::before {
	background: #0B4F9F;
	width: 8px;
	height: 8px;
}

.euro-toc-link.active {
	background: #E7F3FF;
	color: #0B4F9F;
	font-weight: 600;
	padding-left: 30px;
}

.euro-toc-link.active::before {
	background: #0B4F9F;
	width: 8px;
	height: 8px;
}

/* ============================================
   Nested TOC Items (H3 under H2)
   ============================================ */
.euro-toc-list-nested {
	list-style: none;
	margin: 0;
	padding: 0;
	margin-top: 4px;
}

.euro-toc-item-nested {
	margin: 0;
	padding: 0;
}

.euro-toc-link-nested {
	padding: 8px 15px 8px 40px;
	font-size: 13px;
	font-weight: 400;
}

.euro-toc-link-nested::before {
	left: 25px;
	width: 5px;
	height: 5px;
	background: #ADB5BD;
}

.euro-toc-link-nested:hover {
	padding-left: 45px;
}

.euro-toc-link-nested:hover::before {
	background: #0B4F9F;
	width: 6px;
	height: 6px;
}

.euro-toc-link-nested.active {
	padding-left: 45px;
	font-weight: 500;
}

.euro-toc-link-nested.active::before {
	background: #0B4F9F;
	width: 6px;
	height: 6px;
}

/* ============================================
   Sticky Positioning (Desktop)
   ============================================ */
@media screen and (min-width: 1200px) {
	.euro-toc-wrapper.sticky {
		position: sticky;
		top: 100px;
		z-index: 100;
		max-width: 280px;
	}
}

/* ============================================
   Mobile Layout
   ============================================ */
@media screen and (max-width: 767px) {
	.euro-toc-wrapper {
		margin: 20px 0;
	}
	
	.euro-toc-container {
		padding: 15px;
	}
	
	.euro-toc-toggle {
		display: block;
	}
	
	.euro-toc-title {
		font-size: 15px;
	}
	
	.euro-toc-link {
		padding: 8px 12px;
		font-size: 13px;
		padding-left: 22px;
	}
	
	.euro-toc-link:hover,
	.euro-toc-link.active {
		padding-left: 26px;
	}
	
	/* Nested items on mobile */
	.euro-toc-link-nested {
		padding: 6px 10px 6px 32px;
		font-size: 12px;
	}
	
	.euro-toc-link-nested::before {
		left: 18px;
	}
	
	.euro-toc-link-nested:hover,
	.euro-toc-link-nested.active {
		padding-left: 36px;
	}
	
	/* Start collapsed on mobile */
	.euro-toc-nav {
		max-height: 500px;
	}
}

/* ============================================
   Tablet Layout
   ============================================ */
@media screen and (min-width: 768px) and (max-width: 1199px) {
	.euro-toc-wrapper {
		margin: 25px 0;
	}
	
	.euro-toc-container {
		max-width: 100%;
	}
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
	.euro-toc-wrapper {
		display: none;
	}
}

/* ============================================
   Animations
   ============================================ */
@keyframes tocFadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   Compact TOC Variant
   ============================================ */
.euro-toc-compact {
	margin: 20px 0;
}

.euro-toc-compact .euro-toc-container {
	padding: 15px;
	background: #FAFBFC;
	border-left-width: 3px;
}

.euro-toc-compact .euro-toc-header {
	margin-bottom: 12px;
}

.euro-toc-compact .euro-toc-title {
	font-size: 14px;
	font-weight: 600;
}

.euro-toc-compact .euro-toc-icon {
	width: 16px;
	height: 16px;
}

.euro-toc-compact .euro-toc-link {
	padding: 6px 10px;
	font-size: 13px;
	padding-left: 20px;
}

.euro-toc-compact .euro-toc-link::before {
	width: 5px;
	height: 5px;
	left: 8px;
}

.euro-toc-compact .euro-toc-link:hover {
	padding-left: 24px;
}

.euro-toc-compact .euro-toc-link:hover::before {
	width: 6px;
	height: 6px;
}

.euro-toc-compact .euro-toc-link.active {
	padding-left: 24px;
	font-weight: 500;
}

.euro-toc-compact .euro-toc-link.active::before {
	width: 6px;
	height: 6px;
}

/* Compact TOC Nested Items */
.euro-toc-compact .euro-toc-link-nested {
	padding: 5px 8px 5px 32px;
	font-size: 12px;
}

.euro-toc-compact .euro-toc-link-nested::before {
	left: 20px;
	width: 4px;
	height: 4px;
}

.euro-toc-compact .euro-toc-link-nested:hover,
.euro-toc-compact .euro-toc-link-nested.active {
	padding-left: 36px;
}

.euro-toc-compact .euro-toc-link-nested:hover::before,
.euro-toc-compact .euro-toc-link-nested.active::before {
	width: 5px;
	height: 5px;
}

/* Compact TOC Mobile Adjustments */
@media screen and (max-width: 767px) {
	.euro-toc-compact {
		margin: 15px 0;
	}
	
	.euro-toc-compact .euro-toc-container {
		padding: 12px;
	}
	
	.euro-toc-compact .euro-toc-title {
		font-size: 13px;
	}
	
	.euro-toc-compact .euro-toc-link {
		padding: 5px 8px;
		font-size: 12px;
		padding-left: 18px;
	}
	
	.euro-toc-compact .euro-toc-link:hover,
	.euro-toc-compact .euro-toc-link.active {
		padding-left: 22px;
	}
}

.euro-toc-wrapper.animate-in {
	animation: tocFadeIn 0.4s ease;
}

/* ============================================
   Empty State
   ============================================ */
.euro-toc-empty {
	padding: 15px;
	text-align: center;
	color: #6C757D;
	font-size: 14px;
	font-style: italic;
}
