/* تب‌های نوار کناری. یک فهرست در هر لحظه، با رادیو و CSS. */

.oz-tabs {
	align-self: flex-start;
	padding: 12px 12px 14px;
	background: #fff;
	border: 1px solid #e8eef6;
	border-radius: 16px;
}

.oz-tabs::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.oz-cat-sticky {
	position: static;
	align-self: start;
	background: #fff;
	padding-top: 8px;
}

body.admin-bar .oz-cat-sticky {
	top: var(--oz-sticky-top, 124px);
}

.oz-tab-bar {
	position: relative;
	display: flex;
	gap: 0;
	margin: 0 0 12px;
	border-bottom: 1px solid #e8eef6;
}

.oz-tab-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.oz-tab-bar label {
	flex: 1 1 0;
	margin: 0;
	padding: 8px 4px 10px;
	color: #5b6573;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: color .2s ease, border-color .2s ease;
}

.oz-tabs:has(.oz-in-new:checked) label[for$="-new"],
.oz-tabs:has(.oz-in-trend:checked) label[for$="-trend"],
.oz-tabs:has(.oz-in-pop:checked) label[for$="-pop"] {
	color: #1f4fa3;
	border-bottom-color: #1f4fa3;
}

.oz-tabs .wp-block-group__inner-container,
.oz-tab-panels,
.oz-tab-panel {
	padding: 0 !important;
}
.oz-tab-panels,
.oz-tab-panels > .wp-block-group__inner-container,
.oz-tab-panel,
.oz-tab-panel > .wp-block-group__inner-container,
.oz-tabs .gb-query,
.oz-tabs .gb-looper,
.oz-tabs .gb-loop-item {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.oz-tab-panels,
.oz-tab-panels > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.oz-tab-panel {
	grid-area: 1 / 1;
	min-width: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity .28s ease, transform .28s ease, visibility .28s;
}

.oz-tabs .gb-loop-item > a,
.oz-tabs .oz-tab-card {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

.oz-tabs .oz-tab-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	min-width: 0;
}

.oz-tabs .oz-tab-title,
.oz-tabs .oz-tab-title h3 {
	color: inherit;
	text-decoration: none;
}

.oz-tabs .oz-tab-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
}

.oz-tabs .oz-tab-cats a {
	padding: 2px 8px;
	border-radius: 8px;
	background: #1f4fa3;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.oz-tabs .oz-tab-views {
	color: #5b6573;
	font-size: 12px;
}

.oz-tabs .gb-loop-item > a > div {
	flex: 1 1 auto;
	min-width: 0;
}

.oz-tabs .gb-loop-item img {
	width: 76px;
	height: 76px;
	max-width: 76px;
	flex: 0 0 76px;
	object-fit: cover;
	border-radius: 8px;
}

.oz-tabs .gb-loop-item h3 {
	display: -webkit-box;
	margin: 0 0 4px;
	overflow: hidden;
	white-space: normal;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.oz-tabs .gb-loop-item .gb-text:not(h3) {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.oz-tabs:has(.oz-in-new:checked) .oz-panel-new,
.oz-tabs:has(.oz-in-trend:checked) .oz-panel-trend,
.oz-tabs:has(.oz-in-pop:checked) .oz-panel-pop {
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
}

.oz-tab-panel .gb-text {
	margin-top: 0;
}

.oz-cat-sticky .wp-block-categories,
.oz-cat-block .wp-block-categories {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.oz-cat-sticky .cat-item,
.oz-cat-block .cat-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid #e8eef6;
	border-radius: 12px;
	background: #fff;
}

.oz-cat-sticky .cat-item > a,
.oz-cat-block .cat-item > a {
	color: #1b2433;
	text-decoration: none;
}

.oz-cat-sticky .cat-item:not(:has(.children)) > a::before,
.oz-cat-block .cat-item:not(:has(.children)) > a::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.oz-cat-sticky .cat-item::after,
.oz-cat-block .cat-item::after {
	content: "";
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	margin-inline-start: auto;
	border-radius: 50%;
	pointer-events: none;
	background: #eef3fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4fa3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 6 8 12l6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.oz-cat-sticky .cat-item:hover,
.oz-cat-block .cat-item:hover {
	border-color: #1f4fa3;
}

.oz-cat-sticky .cat-item:hover > a,
.oz-cat-block .cat-item:hover > a {
	color: #1f4fa3;
}

.oz-side-comments {
	margin: 0 0 16px;
	padding: 14px;
	background: #fff;
	border: 1px solid #e8eef6;
	border-radius: 16px;
}

.oz-side-comments h2 {
	margin: 0 0 10px;
	font-size: 16px;
}

.oz-side-comments ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.oz-side-comments a {
	display: grid;
	gap: 2px;
	color: #1b2433;
	text-decoration: none;
}

.oz-side-comments span {
	color: #5b6573;
	font-size: 13px;
}

@media (max-width: 900px) {
	.oz-tabs {
		position: static;
		max-height: none;
		overflow: visible;
	}

	.single-post .oz-tabs {
		position: sticky;
		top: var(--oz-sticky-top, 92px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.oz-tab-panel,
	.oz-tab-bar label {
		transition: none;
	}
}
