/* =============================================
   tesall_filespage.css — TESALL.club
   Главная страница раздела файлов
   ============================================= */

/* ── Layout — раскладка через ipsGrid ─────── */
/* IPS рендерит сетку через .ipsGrid_span6.
   Левая колонка (категории) — фиксированные 320px,
   правая забирает оставшееся пространство.            */
@media screen and (min-width: 768px) {
	.ipsGrid:has(> .ipsGrid_span6 .taFiles-sidebar-block) {
		display: flex;
		gap: 10px;
		align-items: flex-start;
	}

	.ipsGrid > .ipsGrid_span6:has(.taFiles-sidebar-block) {
		width: 320px;
		flex: 0 0 320px;
		max-width: 320px;
	}

	.ipsGrid:has(> .ipsGrid_span6 .taFiles-sidebar-block)
		> .ipsGrid_span6:has(.taFiles-sidebar-block)
		~ .ipsGrid_span6 {
		flex: 1 1 auto;
		max-width: none;
		width: auto;
	}
}

.taFiles-section { margin-bottom: 10px; }

@media screen and (max-width: 480px) {
	.taFiles-grid { grid-template-columns: 1fr !important; }
}


/* ── PINNED — Рекомендованные моды ──────── */
.taFiles-pinned {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.taFiles-pinned__card {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	flex: 1 1 160px;
	min-height: 120px;
	cursor: pointer;
}

.taFiles-pinned__card--big {
	flex: 1 1 100%;
	min-height: 260px;
}

.taFiles-pinned__link {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.taFiles-pinned__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s;
}
.taFiles-pinned__card:hover .taFiles-pinned__img { transform: scale(1.04); }

.taFiles-pinned__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.05) 55%, transparent 100%);
}

.taFiles-pinned__body {
	position: relative;
	z-index: 1;
	padding: 10px 12px;
}

.taFiles-pinned__title {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
	margin: 0 0 3px;
}
.taFiles-pinned__card--big .taFiles-pinned__title { font-size: 20px; }

.taFiles-pinned__author {
	font-size: 12px;
	color: rgba(255,255,255,.65);
}


/* ── GRID — Новые моды (плитки) ─────────── */
.taFiles-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.taFiles-tile {
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.taFiles-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.taFiles-tile__thumb {
	aspect-ratio: 16/9;
	position: relative;
	overflow: hidden;
	display: block;
	flex-shrink: 0;
}
.taFiles-tile__thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s;
}
.taFiles-tile:hover .taFiles-tile__thumb-img { transform: scale(1.06); }

.taFiles-tile__cat-badge {
	position: absolute;
	top: 7px;
	left: 7px;
	background: rgba(255,255,255,.92);
	color: #111;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 2px 7px;
	border-radius: 3px;
}

.taFiles-tile__body {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.taFiles-tile__title {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.taFiles-tile__title a { color: inherit; }
.taFiles-tile__title a:hover { color: var(--theme-main_nav_tab_bg); }

.taFiles-tile__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	gap: 6px;
}

.taFiles-tile__author {
	font-size: 11.5px;
	color: var(--theme-text_color_light);
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.taFiles-tile__author a { color: inherit; }
.taFiles-tile__author a:hover { color: var(--theme-main_nav_tab_bg); }

.taFiles-tile__stats {
	display: flex;
	gap: 8px;
	font-size: 11.5px;
	color: var(--theme-text_color_light);
	flex-shrink: 0;
	opacity: .75;
}
.taFiles-tile__stats span { display: flex; align-items: center; gap: 3px; }


/* ── UPDATED — Обновлённые моды ──────────── */
.taFiles-updated {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px 16px;
	border-radius: 8px;
}

.taFiles-updated__item {
	display: grid;
	grid-template-columns: 80px 1fr;
	gap: 12px;
	align-items: center;
	padding: 8px 10px;
	border-bottom: 1px solid rgba(255,255,255,.05);
	transition: background .15s;
}
.taFiles-updated__item:last-child { border-bottom: none; }
.taFiles-updated__item:hover { background: var(--theme-area_background_alt, rgba(127, 127, 127, 0.1)); }

.taFiles-updated__thumb {
	width: 80px;
	height: 60px;
	border-radius: 4px;
	overflow: hidden;
	display: block;
}
.taFiles-updated__thumb img { width: 100%; height: 100%; object-fit: cover; }

.taFiles-updated__info { min-width: 0; }

.taFiles-updated__title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}
.taFiles-updated__title:hover { color: var(--theme-main_nav_tab_bg); }

.taFiles-updated__meta {
	display: flex;
	gap: 10px;
	font-size: 12px;
	color: var(--theme-text_color_light);
	opacity: .7;
	margin-top: 4px;
	white-space: nowrap;
	overflow: hidden;
}

@media screen and (max-width: 900px) {
	.taFiles-updated { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 480px) {
	.taFiles-updated { grid-template-columns: 1fr; }
}


/* ── RIGHT — Override IPS widget margin ─── */
.taFiles-right .ipsWidget_vertical {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
}


/* ── RIGHT — Топ модов + Популярные авторы ── */
.taFiles-top-list,
.taFiles-authors {
	display: flex;
	flex-direction: column;
}

.taFiles-top-item,
.taFiles-author-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-bottom: 1px solid rgba(255,255,255,.05);
	transition: background .15s;
	width: 100%;
}
.taFiles-top-item:last-child,
.taFiles-author-item:last-child { border-bottom: none; }

.taFiles-top-item:hover,
.taFiles-author-item:hover { background: var(--theme-area_background_alt, rgba(127, 127, 127, 0.1)); }

.taFiles-top-item__info,
.taFiles-author-item__info { flex: 1; min-width: 0; }

.taFiles-top-item__title,
.taFiles-author-item__name {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: inherit;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.taFiles-top-item__title:hover,
.taFiles-author-item__name:hover { color: var(--theme-main_nav_tab_bg); }

.taFiles-top-item__meta,
.taFiles-author-item__files {
	font-size: 11px;
	color: var(--theme-text_color_light);
	opacity: .7;
	margin-top: 2px;
}

/* Топ модов: прямоугольная миниатюра */
.taFiles-top-item__thumb {
	width: 52px;
	height: 38px;
	border-radius: 4px;
	overflow: hidden;
	display: block;
	flex-shrink: 0;
}
.taFiles-top-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Мета-строка топа: два элемента по краям */
.taFiles-top-item__meta {
	display: flex;
	justify-content: space-between;
}

/* Счётчик скачиваний автора: в строку с иконкой */
.taFiles-author-item__files {
	display: flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
}


/* ── RIGHT — Последние комментарии ──────── */
.taFiles-comments { display: flex; flex-direction: column; }

.taFiles-comment-item {
	position: relative;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(255,255,255,.05);
	transition: background .15s;
	cursor: pointer;
}
.taFiles-comment-item:last-child { border-bottom: none; }
.taFiles-comment-item:hover { background: var(--theme-area_background_alt, rgba(127, 127, 127, 0.1)); }

.taFiles-comment-item__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}
.taFiles-comment-item a:not(.taFiles-comment-item__overlay) {
	position: relative;
	z-index: 2;
}

.taFiles-comment-item__header {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 4px;
}
.taFiles-comment-item__header img {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
}

.taFiles-comment-item__author { font-size: 12px; font-weight: 600; }
.taFiles-comment-item__author a { color: inherit; }
.taFiles-comment-item__author a:hover { color: var(--theme-main_nav_tab_bg); }

.taFiles-comment-item__where {
	display: block;
	font-size: 11.5px;
	color: var(--theme-main_nav_tab_bg, #c69c4d);
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.taFiles-comment-item__text {
	font-size: 11.5px;
	color: var(--theme-text_color_light);
	opacity: .75;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.taFiles-comment-item__date {
	display: block;
	font-size: 10.5px;
	color: var(--theme-text_color_light);
	opacity: .45;
	margin-top: 4px;
}


/* ── Dropdown переключатель периода ─────── */
.taTop-dropdown {
	float: right;
	position: relative;
	font-weight: 400;
}

.taTop-dropdown__selected {
	font-size: 12px;
	font-weight: 400;
	cursor: pointer;
	padding: 2px 6px;
	color: var(--theme-text_color_light);
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.taTop-dropdown__menu {
	display: none;
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	min-width: 110px;
	z-index: 999;
	list-style: none;
	padding: 4px 0;
	margin: 0;
	box-shadow: 0 4px 12px rgba(0,0,0,.15);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.taTop-dropdown.open .taTop-dropdown__menu { display: block; }

.taTop-option {
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
	color: #444;
	background: none;
	border: none;
	list-style: none;
	transition: background .12s;
	white-space: nowrap;
}
.taTop-option:hover { background: #f5f5f5; }
.taTop-option.active { color: var(--theme-main_nav_tab_bg, #c69c4d); }

/* Аватар автора в виджете «Популярные авторы» — IPS userPhoto 'tiny' */
.taFiles-author-item .ipsUserPhoto { flex-shrink: 0; }