/* Tastoria long-form layout and sticky in-page guide */
.tastoria-guide-layout {
	box-sizing: border-box !important;
	display: grid !important;
	grid-template-columns: minmax(24px, 1fr) minmax(0, 798px) 54px 260px minmax(24px, 1fr) !important;
	gap: 0 !important;
	align-items: start !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 64px 0 90px !important;
	background: #f6f4ee !important;
	direction: ltr !important;
}

.tastoria-guide-layout > .tastoria-main-flow {
	box-sizing: border-box;
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	width: 100%;
	direction: rtl;
}

.tastoria-guide-layout > .tastoria-auto-toc {
	grid-column: 4;
	grid-row: 1;
	direction: rtl;
	position: sticky;
	top: 110px;
	align-self: start;
	z-index: 5;
}

.tastoria-existing-guide-layout > .tastoria-sticky-toc-column {
	grid-column: 4 !important;
	grid-row: 1 !important;
	width: 260px !important;
	max-width: 260px !important;
	min-width: 0 !important;
}

.tastoria-existing-guide-layout > :not(.tastoria-sticky-toc-column) {
	grid-column: 2 !important;
	grid-row: 1 !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	direction: rtl;
}

.tastoria-side-toc {
	box-sizing: border-box !important;
	width: 260px !important;
	max-width: 260px !important;
	margin: 0 !important;
	padding: 22px !important;
	background: #ffffff !important;
	border: 1px solid #dbe2de !important;
	border-top: 4px solid #9a5854 !important;
	border-radius: 14px !important;
	box-shadow: 0 10px 35px rgba(16, 51, 42, 0.06) !important;
	color: #24352f !important;
	direction: rtl;
	text-align: right;
}

.tastoria-side-toc .tastoria-guide-title {
	display: block !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	color: #123b30 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.8 !important;
}

.tastoria-side-toc a {
	display: block !important;
	position: relative;
	width: 100% !important;
	margin: 0 !important;
	padding: 9px 0 !important;
	border-bottom: 1px solid #e3e7e4 !important;
	background: transparent !important;
	color: #17624e !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.8 !important;
	text-decoration: none !important;
	transition: color .18s ease, background-color .18s ease, padding-right .18s ease;
}

.tastoria-side-toc a:last-child {
	border-bottom: 0 !important;
}

.tastoria-side-toc a:hover,
.tastoria-side-toc a:focus-visible,
.tastoria-side-toc a.is-current {
	padding-right: 10px !important;
	background: #fbf5f1 !important;
	color: #a14835 !important;
	outline: 0;
}

.tastoria-side-toc a.is-current::before {
	content: "";
	position: absolute;
	top: 10px;
	right: 0;
	width: 3px;
	height: calc(100% - 20px);
	border-radius: 4px;
	background: #9a5854;
}

.e-con.tastoria-sticky-toc-column {
	position: sticky !important;
	top: 110px !important;
	align-self: start !important;
	z-index: 5;
	max-height: calc(100vh - 134px);
	overflow-y: auto;
	scrollbar-width: thin;
}

.e-con.tastoria-sticky-toc-column > .elementor-widget,
.e-con.tastoria-sticky-toc-column .tastoria-side-toc {
	width: 260px !important;
	max-width: 260px !important;
}

.tastoria-guide-layout > .tastoria-auto-toc {
	max-height: calc(100vh - 134px);
	overflow-y: auto;
	scrollbar-width: thin;
}

.elementor h2[id],
.elementor h3[id],
.elementor [id^="tastoria-section-"] {
	scroll-margin-top: 116px;
}

@media (max-width: 1024px) {
	.tastoria-guide-layout {
		grid-template-columns: minmax(20px, 1fr) minmax(0, 1fr) minmax(20px, 1fr) !important;
		padding: 42px 0 68px !important;
	}

	.tastoria-guide-layout > .tastoria-main-flow,
	.tastoria-guide-layout > .tastoria-auto-toc,
	.tastoria-existing-guide-layout > .tastoria-sticky-toc-column,
	.tastoria-existing-guide-layout > :not(.tastoria-sticky-toc-column) {
		grid-column: 2 !important;
		width: 100% !important;
		max-width: none !important;
	}

	.tastoria-guide-layout > .tastoria-auto-toc,
	.tastoria-existing-guide-layout > .tastoria-sticky-toc-column {
		grid-row: 1 !important;
		position: static !important;
		top: auto !important;
		max-height: none;
		overflow: visible;
		margin-bottom: 28px !important;
	}

	.tastoria-guide-layout > .tastoria-main-flow,
	.tastoria-existing-guide-layout > :not(.tastoria-sticky-toc-column) {
		grid-row: 2 !important;
	}

	.tastoria-side-toc,
	.e-con.tastoria-sticky-toc-column > .elementor-widget,
	.e-con.tastoria-sticky-toc-column .tastoria-side-toc {
		width: 100% !important;
		max-width: none !important;
	}
}

@media (max-width: 767px) {
	.tastoria-guide-layout {
		grid-template-columns: 16px minmax(0, 1fr) 16px !important;
		padding: 30px 0 54px !important;
	}

	.tastoria-side-toc {
		padding: 18px !important;
		border-radius: 12px !important;
	}

	.tastoria-side-toc .tastoria-guide-title {
		font-size: 17px !important;
	}

	.tastoria-side-toc a {
		padding: 8px 0 !important;
		font-size: 14px !important;
	}
}
