/* --- Page: разводящая «Все облачные приложения 1С» (Figma 1:2293 / 34:2745 / 34:9928) --- */

/* Каталог */
.apps-catalog {
	display: flex;
	flex-direction: column;
	gap: var(--space24);
}
.apps-catalog__list {
	min-width: 0;
}

/* Панель над сеткой: активные фильтры + количество */
.apps-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space16);
	margin-bottom: var(--space24);
}
.apps-toolbar[hidden] {
	display: none;
}
.apps-active {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space16);
}
.apps-active[hidden] {
	display: none;
}
.apps-count {
	font-family: var(--font-google-sans);
	font-size: var(--font-body-small);
	line-height: 1.4;
	color: var(--text-colors-body-2);
}
.apps-count[hidden] {
	display: none;
}
.apps-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: var(--space8);
	border: var(--stroke-2) solid var(--stroke-colors-neutral-0);
	border-radius: var(--corner3);
	background: var(--bg-colors-white-white-100);
	font-family: var(--font-google-sans);
	font-size: var(--font-button-small);
	font-weight: var(--fw-semibold);
	line-height: 1;
	white-space: nowrap;
	color: var(--button-text-black-secondary);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.apps-chip > span {
	padding: 0 var(--space8);
}
.apps-chip svg {
	display: block;
	flex-shrink: 0;
}
.apps-chip:hover {
	background: var(--bg-colors-neutral-neutral-6);
}
.apps-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space16);
}
.apps-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space32);
	padding: var(--space48) 0;
}
.apps-empty.hidden {
	display: none;
}
.apps-empty__text {
	max-width: 494px;
	text-align: center;
}
.apps-empty__img {
	display: block;
	width: 100%;
	max-width: 473px;
	height: auto;
}

/* Фильтры: панель */
.apps-filters__backdrop {
	display: none;
}
.apps-filters {
	display: flex;
	flex-direction: column;
	gap: var(--space24);
}
.apps-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space12);
}
.apps-filters__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: var(--corner3);
	background: none;
	color: var(--text-colors-titles);
	cursor: pointer;
}
.apps-filters__close:hover {
	color: var(--button-text-secondary);
}
.apps-filters__body {
	display: flex;
	flex-direction: column;
	gap: var(--space16);
}
.apps-filters__group {
	padding: 0;
}
.apps-filters__group_btn {
	display: flex;
	align-items: center;
	gap: var(--space12);
	width: fit-content;
	min-height: 54px;
	padding: var(--space12) 0;
	border: 0;
	background: none;
	font-family: var(--font-google-sans);
	font-size: var(--font-h3);
	font-weight: var(--fw-semibold);
	line-height: 1;
	white-space: nowrap;
	color: var(--button-text-black-secondary);
	cursor: pointer;
	text-align: left;
}
.apps-filters__group.is_open .apps-filters__group_btn {
	color: var(--button-text-secondary);
}
.apps-filters__group_btn svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}
.apps-filters__group.is_open .apps-filters__group_btn svg {
	transform: rotate(180deg);
}
.apps-filters__panel {
	display: none;
}
.apps-filters__group.is_open .apps-filters__panel {
	display: block;
}
.apps-filters__list {
	display: flex;
	flex-direction: column;
	gap: var(--space16);
	margin-top: var(--space16);
}
.apps-filters__list .form_checkbox {
	gap: var(--space12);
	width: 100%;
	align-items: center;
}
.apps-filters__list .form_checkbox_label {
	flex: 1;
	font-size: var(--font-body-medium);
	line-height: var(--lh-body);
	color: var(--text-colors-body-1);
}
.apps-filters__extra {
	display: flex;
	flex-direction: column;
	gap: var(--space16);
}
.apps-filters__more {
	align-self: flex-start;
	margin-top: 0;
	padding-left: 0;
	padding-right: 0;
}
.apps-filters__reset {
	align-self: flex-start;
}
.apps-filters__apply {
	width: 100%;
}
.apps-filters__open {
	display: flex;
	width: max-content;
	margin-left: 0;
	margin-bottom: var(--space32);
	color: var(--button-text-black-secondary);
}
.apps-filters__open.button {
	gap: var(--space12);
	padding-inline: 0;
}

.apps-filters__open:hover {
	color: var(--button-text-black-secondary-hover);
}

@media (min-width: 700px) {
	.apps-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space24);
	}
}

@media (min-width: 1200px) {
	.apps-catalog {
		flex-direction: row;
		align-items: flex-start;
		gap: var(--space24);
	}
	.apps-filters {
		flex: 0 0 271px;
		position: sticky;
		top: 150px;
		max-height: calc(100vh - 180px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-gutter: stable;
	}
	.apps-filters__close,
	.apps-filters__apply,
	.apps-filters__open {
		display: none;
	}
}

/* Фильтры: drawer (mobile/tablet) */
@media (max-width: 1199px) {
	.apps-filters {
		position: fixed;
		inset: 0;
		z-index: 210;
		display: none;
		flex-direction: column;
		justify-content: flex-start;
		padding: 42px; /* Figma tablet */
		background-color: var(--bg-colors-white-white-100);
		overflow-y: auto;
		gap: var(--space24);
	}
	.apps-filters.is_open {
		display: flex;
	}
	.apps-filters__head {
		padding-bottom: 0;
	}
	.apps-filters__close {
		position: absolute;
		top: 22px;
		right: 17px;
	}
	.apps-filters__apply {
		position: sticky;
		bottom: 0;
		margin-top: auto;
	}
	/* Подложка drawer: затемнение 25% (Figma Uni/Neutral/Neutral 0/Opacity25) */
	body.apps-filters_lock .apps-filters__backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 205;
		background-color: rgba(46, 46, 60, 0.25);
	}
}

/* Фильтры: планшетный drawer (700–1199) */
@media (min-width: 700px) and (max-width: 1199px) {
	.apps-filters {
		inset: 0 auto 0 0;
		width: 372px;
		max-width: 100%;
		padding: 42px; /* Figma tablet */
		gap: var(--space24);
		overflow: hidden;
	}
	.apps-filters__head {
		padding-bottom: 0;
	}
	.apps-filters__body {
		flex: 1;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.apps-filters__apply {
		position: static;
		margin-top: var(--space24);
	}
}
body.apps-filters_lock {
	overflow: hidden;
}

/* Карточка приложения */
.app-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--space24);
	min-height: 209px;
	padding: var(--space24);
	overflow: clip;
	border: var(--stroke-1) solid var(--stroke-colors-neutral-1);
	border-radius: 24px;
	background-color: var(--bg-colors-white-white-100);
}
.app-card[hidden] {
	display: none;
}
.app-card__icon {
	display: none;
	position: absolute;
	top: -1px;
	right: -1px;
	z-index: 1;
	width: 140px;
	height: 140px;
	pointer-events: none;
}
.app-card__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.app-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: var(--space16);
	padding-right: 0;
}
.app-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space8);
}
.app-card__badges .badge {
	font-size: var(--font-caption);
	line-height: var(--lh-caption);
}
.app-card__head {
	display: flex;
	flex-direction: column;
	gap: var(--space12);
}
.app-card__title {
	overflow-wrap: break-word;
	font-family: var(--font-google-sans);
	font-size: var(--font-h4);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-h4);
	color: var(--text-colors-titles);
}
.app-card__text {
	font-family: var(--font-google-sans);
	font-size: var(--font-caption);
	line-height: var(--lh-caption);
	color: var(--text-colors-body-1);
}
.app-card__action {
	position: relative;
	z-index: 2;
	align-self: flex-start;
}
.app-card__action .button_tertiary svg {
	margin-left: var(--space4);
}
.app-card__versions {
	display: none;
	flex-wrap: wrap;
	gap: var(--space16);
}
.app-card__versions .button_line {
	border-width: var(--stroke-2);
}

@media (hover: hover) {
	.app-card:hover {
		border-color: var(--uni-colors-blue-blue-2);
		background-image: linear-gradient(59.585deg, #ffffff 2.18%, var(--bg-colors-blue-blue-7) 99.19%);
	}
	.app-card:hover .app-card__more {
		display: none;
	}
	.app-card:hover .app-card__versions {
		display: flex;
	}
}

@media (min-width: 700px) {
	.app-card__icon {
		display: block;
	}
	.app-card__body {
		padding-right: 118px;
	}
}

@media (min-width: 1200px) {
	.app-card__body {
		padding-right: 114px;
	}
}

/* Промо «Нужна помощь с выбором?»: высота по контенту (min-height из base.css не нужен) */
.promo_pic {
	min-height: 0;
}
