/**
 * Gutschein Easy TOC follows the credit-card rail's typography and link rhythm.
 * The widget moves between the sidebar and article, so selectors follow the
 * plugin container. Reader-mode AMP uses the shortcode and keeps all links.
 */
body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: var(--ut-spacing-md, 16px) var(--ut-spacing-lg, 24px);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--text-primary-color, #1e2058);
	text-align: left;
}

/* The sidebar and mobile widget area already supply the surrounding gutter. */
body.gutscheine-template-default:not(.black-friday-template) .desktop-sidebar-container #ez-toc-widget-container,
body.gutscheine-template-default:not(.black-friday-template) .mobile-post-widgets #ez-toc-widget-container {
	padding-inline-start: 0;
}

body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container > h3 {
	margin: 0;
	padding: 0;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) .ez-toc-title-container {
	display: flex;
	align-items: center;
	min-height: 24px;
	margin: 0;
	gap: var(--ut-spacing-sm, 8px);
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) .ez-toc-title-container::before {
	content: '';
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	background: url('../../images/toc-list-unordered.svg') center / 16px 12.002px no-repeat;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) .ez-toc-title {
	margin: 0;
	color: var(--text-primary-color, #1e2058);
	font: 600 var(--ut-font-size-sm, 14px) / var(--ut-line-height-md, 22px)
		var(--ut-font-family, 'Poppins', sans-serif);
	text-transform: none;
	text-align: left;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list {
	margin: var(--ut-spacing-md, 16px) 0 0;
	padding: 0;
	list-style: none;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list li {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	list-style: none;
	text-align: left;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list li::before,
body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list li > a::before {
	content: none;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list li > a {
	display: block;
	box-sizing: border-box;
	padding: var(--ut-spacing-sm, 8px) var(--ut-spacing-md, 16px) var(--ut-spacing-sm, 8px) 29px;
	border-left: 3px solid var(--border-default-primary, #cfdbf4);
	color: var(--text-secondary-color, #50527d);
	font: 400 var(--ut-font-size-sm, 14px) / var(--ut-line-height-md, 22px)
		var(--ut-font-family, 'Poppins', sans-serif);
	text-decoration: none;
	overflow-wrap: anywhere;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list ul li > a {
	padding-left: 45px;
}

body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list li > a:hover,
body.gutscheine-template-default:not(.black-friday-template) :is(#ez-toc-widget-container, .amp-wp-article-content #ez-toc-container) ul.ez-toc-list li > a:focus-visible {
	color: var(--text-primary-color, #1e2058);
}

body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container ul.ez-toc-list li.active {
	background: transparent;
}

body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container ul.ez-toc-list li.active > a {
	border-left-color: var(--ut-orange-500, #fc7d21);
	color: var(--text-primary-color, #1e2058);
	font-weight: 600;
}

body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container .ut-easy-toc-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: var(--ut-spacing-sm, 8px) 0 0;
	padding: var(--ut-spacing-sm, 8px) var(--ut-spacing-md, 16px);
	border: 0;
	border-top: 1px solid var(--border-default-primary, #cfdbf4);
	border-radius: 0;
	background: transparent;
	color: var(--text-primary-color, #1e2058);
	font: 600 var(--ut-font-size-sm, 14px) / var(--ut-line-height-md, 22px)
		var(--ut-font-family, 'Poppins', sans-serif);
	cursor: pointer;
	gap: var(--ut-spacing-sm, 8px);
}

body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container .ut-easy-toc-mobile-toggle::after {
	content: '';
	width: 8px;
	height: 8px;
	border-right: 2px solid currentcolor;
	border-bottom: 2px solid currentcolor;
	transform: translateY(-2px) rotate(45deg);
}

body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container .ut-easy-toc-mobile-toggle[aria-expanded='true']::after {
	transform: translateY(2px) rotate(225deg);
}

@media (max-width: 800px) {
	body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container:not(.is-mobile-expanded) li.ut-easy-toc-mobile-overflow {
		display: none;
	}

	body.gutscheine-template-default:not(.black-friday-template) #ez-toc-widget-container .ut-easy-toc-mobile-toggle {
		display: flex;
	}
}
