/**
 * Post Navigation Block (TOC) styles adapted for Retnews.
 */

.custom-post-navigation-target {
	scroll-margin-top: 120px;
}

.wp-block-retnews-post-navigation-block.custom-post-navigation-block,
.custom-post-navigation-block {
	margin: 2rem 0 2.5rem;
}

.custom-post-navigation-block__container {
	padding: 1.5rem 1.75rem 1.35rem;
	border: 1px solid #ececec;
	border-top: 4px solid #ff8200;
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
}

.custom-post-navigation-block__header {
	position: relative;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
}

.custom-post-navigation-block__header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: #ececec;
}

.custom-post-navigation-block__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #212529;
}

.custom-post-navigation-block__nav {
	display: block;
}

.custom-post-navigation-block__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.custom-post-navigation-block__item {
	margin: 0;
}

.custom-post-navigation-block__link {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
	font-size: 0.96rem;
	font-weight: 600;
	line-height: 1.55;
	text-align: left;
	text-decoration: none;
	color: #343a40;
	transition: color 0.2s ease, transform 0.2s ease;
}

.custom-post-navigation-block__link::before {
	content: "";
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	margin-top: 0.42rem;
	border-radius: 50%;
	background: #ff8200;
	box-shadow: 0 0 0 4px rgba(255, 130, 0, 0.14);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.custom-post-navigation-block__link:hover,
.custom-post-navigation-block__link:focus-visible {
	color: #ff8200;
	transform: translateX(4px);
}

.custom-post-navigation-block__link:hover::before,
.custom-post-navigation-block__link:focus-visible::before {
	transform: scale(1.08);
	box-shadow: 0 0 0 5px rgba(255, 130, 0, 0.18);
}

.custom-post-navigation-block__link:focus-visible {
	outline: none;
}

.custom-post-navigation-block__item--empty {
	padding: 0.9rem 1rem;
	border-radius: 8px;
	background: #f8f9fa;
	color: #6c757d;
	font-size: 0.92rem;
	font-style: italic;
}

.custom-post-navigation-block__item--level-3,
.custom-post-navigation-block__item--level-4,
.custom-post-navigation-block__item--level-5,
.custom-post-navigation-block__item--level-6 {
	padding-left: 1.25rem;
}

.custom-post-navigation-block__item--level-3 .custom-post-navigation-block__link,
.custom-post-navigation-block__item--level-4 .custom-post-navigation-block__link,
.custom-post-navigation-block__item--level-5 .custom-post-navigation-block__link,
.custom-post-navigation-block__item--level-6 .custom-post-navigation-block__link {
	font-size: 0.92rem;
	font-weight: 500;
}

.custom-post-navigation-block__item--level-3 .custom-post-navigation-block__link::before,
.custom-post-navigation-block__item--level-4 .custom-post-navigation-block__link::before,
.custom-post-navigation-block__item--level-5 .custom-post-navigation-block__link::before,
.custom-post-navigation-block__item--level-6 .custom-post-navigation-block__link::before {
	width: 6px;
	height: 6px;
	margin-top: 0.48rem;
}

.custom-post-navigation-block-editor {
	padding: 1rem;
	border: 1px dashed #d0d7de;
	border-radius: 10px;
	background: #ffffff;
}

.custom-post-navigation-block-preview {
	padding: 1.5rem;
	border-radius: 8px;
	background: linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
	text-align: center;
}

.custom-post-navigation-block-preview__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	height: 54px;
	margin-bottom: 0.75rem;
	padding: 0 0.9rem;
	border-radius: 999px;
	background: rgba(255, 130, 0, 0.12);
	color: #ff8200;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.custom-post-navigation-block-preview__text {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	font-weight: 700;
	color: #212529;
}

.custom-post-navigation-block-preview__hint {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.6;
	color: #6c757d;
}

@media (max-width: 767px) {
	.wp-block-retnews-post-navigation-block.custom-post-navigation-block,
	.custom-post-navigation-block {
		margin: 1.5rem 0 2rem;
	}

	.custom-post-navigation-block__container {
		padding: 1.25rem 1rem 1.1rem;
	}

	.custom-post-navigation-block__item--level-3,
	.custom-post-navigation-block__item--level-4,
	.custom-post-navigation-block__item--level-5,
	.custom-post-navigation-block__item--level-6 {
		padding-left: 0.85rem;
	}
}
