/* Modern & Beautiful Frontend CSS for Taco Table of Contents */

.tacotoc-wrapper {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	padding: 0;
	border-radius: 12px;
	max-width: 100%;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	margin: 20px 0;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tacotoc-wrapper:hover {
	border-color: #cbd5e1;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.tacotoc-title {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin: 0;
	padding: 16px 20px !important;
	background: #f8fafc;
	color: #475569;
	border-bottom: 1px solid #e2e8f0;
}

.tacotoc-wrapper ol {
	margin: 0;
	padding: 16px 20px;
	list-style-type: none; /* Switch to CSS counters or custom indicators if preferred, or keep standard list */
}

.tacotoc-wrapper ol li {
	margin-bottom: 8px;
	line-height: 1.6;
	font-size: 14px;
	position: relative;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.tacotoc-wrapper ol li:last-child {
	margin-bottom: 0;
}

.tacotoc-wrapper ol li a {
	text-decoration: none;
	color: #475569;
	font-weight: 500;
	transition: color 0.2s ease, transform 0.2s ease;
	display: inline-flex;
	align-items: flex-start;
	padding: 2px 0;
}

.tacotoc-number {
	color: #475569;
	font-weight: 600;
	margin-right: 6px;
	flex-shrink: 0;
}

body.rtl .tacotoc-number {
	margin-right: 0;
	margin-left: 6px;
}

.tacotoc-wrapper ol li a:hover {
	color: #2563eb;
	transform: translateX(2px);
}

/* Toggle Expansion Button */
.tacotoc-toggle {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	cursor: pointer;
	padding: 0;
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	line-height: 1;
	border-radius: 6px;
	margin-right: 8px;
	transition: all 0.2s ease;
	    position: absolute;
    left: -25px;
    top: 4px;
}

.tacotoc-toggle:hover {
	color: #1e293b;
	background-color: #e2e8f0;
	border-color: #cbd5e1;
}

/* Active State Highlighting */
.tacotoc-wrapper ol li.active > a {
	font-weight: 700;
	color: #2563eb; /* Modern Blue */
}

.tacotoc-wrapper ol li.active > a .tacotoc-number {
	color: #2563eb;
}

.tacotoc-wrapper ol li.active {
	background: rgba(37, 99, 235, 0.04);
	border-radius: 6px;
	padding-left: 8px;
	margin-left: -8px;
}

/* Indentation Hierarchy */
.tacotoc-h1 {
	padding-left: 0;
}

.tacotoc-h2 {
	margin-left: 16px !important;
}

.tacotoc-h3 {
	margin-left: 32px !important;
}

.tacotoc-h4 {
	margin-left: 48px !important;
}

.tacotoc-h5 {
	margin-left: 64px !important;
}

.tacotoc-h6 {
	margin-left: 80px !important;
}

/* RTL Support Adaptations */
body.rtl .tacotoc-wrapper ol li.active {
	padding-left: 0;
	padding-right: 8px;
	margin-left: 0;
	margin-right: -8px;
}

body.rtl .tacotoc-toggle {
	margin-right: 0;
	margin-left: 8px;
}

body.rtl .tacotoc-h2 {
	margin-left: 0 !important;
	margin-right: 16px !important;
}

body.rtl .tacotoc-h3 {
	margin-left: 0 !important;
	margin-right: 32px !important;
}

body.rtl .tacotoc-h4 {
	margin-left: 0 !important;
	margin-right: 48px !important;
}

body.rtl .tacotoc-h5 {
	margin-left: 0 !important;
	margin-right: 64px !important;
}

body.rtl .tacotoc-h6 {
	margin-left: 0 !important;
	margin-right: 80px !important;
}

/* skeleton Loading Effect */
.tacotoc-skeleton-line {
	height: 12px;
	margin-bottom: 12px;
	background: #f1f5f9;
	background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
	background-size: 200% 100%;
	animation: tacotoc-loading 1.5s infinite ease-in-out;
	border-radius: 6px;
}

.tacotoc-skeleton-line:last-child {
	margin-bottom: 0;
}

.tacotoc-skeleton-header {
	width: 30%;
	height: 18px;
	margin-bottom: 24px;
	border-radius: 4px;
}

.tacotoc-skeleton-100 { width: 100%; }
.tacotoc-skeleton-90 { width: 90%; }
.tacotoc-skeleton-95 { width: 95%; }
.tacotoc-skeleton-80 { width: 80%; }

@keyframes tacotoc-loading {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}