.photos-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 64px 20px 28px;
	box-sizing: border-box;
	background: rgba(12, 14, 18, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	font-family: 'Poppins', sans-serif;
	overflow: auto;
}

.photos-modal .wrapper {
	max-width: 1080px;
	width: 100%;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

.photos-modal .relative {
	position: relative;
}

.photos-modal_close {
	position: fixed;
	top: 14px;
	right: 16px;
	z-index: 10052;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	transform: none !important;
	font-size: 16px;
	line-height: 1;
	transition: background 0.2s ease;
}

.photos-modal_close i {
	font-size: 18px;
	line-height: 1;
}

.photos-modal_close:hover,
.photos-modal_close:focus {
	background: #e81932;
	color: #fff !important;
}

.photos-modal_toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
	min-height: 28px;
}

.photos-modal_keyboard-info {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.88);
	font-size: 12px;
	line-height: 1.3;
	font-weight: 500;
}

.photos-modal_keyboard-info i {
	font-size: 15px;
	color: #fff;
	margin: 0;
}

.photos-modal_keyboard-info .text {
	margin: 0;
	color: inherit;
}

.photos-modal_categories {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.photos-modal_categories .categories {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px 14px;
	max-height: none;
	height: auto;
	overflow: visible;
	padding: 0;
}

.photos-modal_categories .categories_list {
	display: contents;
}

.photos-modal_categories .categories_link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 4px 0;
	width: auto;
	color: rgba(255, 255, 255, 0.72) !important;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
}

.photos-modal_categories .categories_link:hover,
.photos-modal_categories .categories_link:focus,
.photos-modal_categories .categories_link.active {
	color: #fff !important;
}

.photos-modal_categories .categories_link-category-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 180px;
	color: inherit;
}

.photos-modal_categories .total-photo-count,
.photos-modal_categories .categories_link.active .total-photo-count {
	color: #e81932;
	font-weight: 700;
}

.photos-modal_carousel {
	position: relative;
	width: 100%;
	height: min(62vh, 560px);
	max-height: 560px;
	border-radius: 12px;
	overflow: hidden;
	background: #0b0d12;
}

.photos-modal_carousel .image-count {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 5;
	height: 30px;
	padding: 0 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	pointer-events: none;
}

.photos-modal_carousel .image {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-size: contain;
	background-position: 50%;
	background-repeat: no-repeat;
	border-radius: 12px;
}

.photos-modal_carousel .image.active {
	display: block;
}

.photos-modal .thumbnails_prev,
.photos-modal .thumbnails_next {
	position: absolute;
	top: 50%;
	z-index: 4;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	display: flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	line-height: 1;
	transform: translateY(-50%);
	transition: background 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.photos-modal .thumbnails_prev {
	left: 14px;
}

.photos-modal .thumbnails_next {
	right: 14px;
}

.photos-modal .thumbnails_prev:hover,
.photos-modal .thumbnails_next:hover,
.photos-modal .thumbnails_prev:focus,
.photos-modal .thumbnails_next:focus {
	background: #e81932;
	color: #fff;
	outline: none;
}

.photos-modal .thumbnails_prev i,
.photos-modal .thumbnails_next i {
	color: #fff;
	font-size: 16px;
	line-height: 1;
}

.photos-modal_thumbnails {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	position: relative;
	overflow: hidden;
	margin-top: 14px;
	width: 100%;
}

.photos-modal_thumbnails .thumbnails {
	flex: 1;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 2px 0;
	overflow: hidden;
	display: block;
}

.photos-modal_thumbnails .thumbnails_carousel {
	display: flex;
	flex-wrap: nowrap;
	margin: 0;
	transition: transform 0.45s ease;
}

.photos-modal_thumbnails .thumbnails_item {
	cursor: pointer;
	width: 87px;
	flex: 0 0 87px;
	height: 60px;
	position: relative;
	overflow: hidden;
	margin: 0 5px;
	border-radius: 8px;
	border: 2px solid transparent;
	box-sizing: border-box;
	opacity: 1;
}

.photos-modal_thumbnails .thumbnails_item .image {
	width: 100%;
	height: 60px;
	opacity: 0.48;
	display: block;
	background-size: cover;
	background-position: 50%;
	transition: opacity 0.2s ease;
}

.photos-modal_thumbnails .thumbnails_item:hover .image {
	opacity: 0.85;
}

.photos-modal_thumbnails .thumbnails_item.active {
	border-color: #e81932;
}

.photos-modal_thumbnails .thumbnails_item.active .image {
	opacity: 1;
}

@media (max-width: 991px) {
	.photos-modal {
		align-items: flex-start;
		padding: 56px 12px 20px;
	}

	.photos-modal_toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin-bottom: 10px;
	}

	.photos-modal_keyboard-info {
		display: none !important;
	}

	.photos-modal_categories .categories {
		justify-content: flex-start;
	}

	.photos-modal_carousel {
		height: 46vh;
		max-height: 380px;
		border-radius: 10px;
	}

	.photos-modal .thumbnails_prev,
	.photos-modal .thumbnails_next {
		width: 40px;
		height: 40px;
	}

	.photos-modal .thumbnails_prev {
		left: 8px;
	}

	.photos-modal .thumbnails_next {
		right: 8px;
	}

	.photos-modal_close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}
}

@media (max-width: 575px) {
	.photos-modal_carousel {
		height: 42vh;
		max-height: 280px;
	}

	.photos-modal_categories .categories_link {
		font-size: 13px;
	}

	.photos-modal_carousel .image-count {
		right: 8px;
		bottom: 8px;
		height: 26px;
		padding: 0 10px;
		font-size: 12px;
	}
}
