/*
 * Copyright (C) 2026 Fluxer Contributors
 *
 * This file is part of Fluxer.
 *
 * Fluxer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Fluxer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
 */

.twoImageGrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	width: 100%;
}

.threeImageGrid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: auto auto;
	gap: 4px;
	width: 100%;
}

.threeImageGrid > :first-child {
	grid-row: 1 / 3;
}

.fourImageGrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto auto;
	gap: 4px;
	width: 100%;
}

.fiveImageGrid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-template-rows: auto auto;
	gap: 4px;
	width: 100%;
}

.fiveImageGrid > :nth-child(1) {
	grid-column: 1 / 4;
	grid-row: 1;
}

.fiveImageGrid > :nth-child(2) {
	grid-column: 4 / 7;
	grid-row: 1;
}

.fiveImageGrid > :nth-child(3) {
	grid-column: 1 / 3;
	grid-row: 2;
}

.fiveImageGrid > :nth-child(4) {
	grid-column: 3 / 5;
	grid-row: 2;
}

.fiveImageGrid > :nth-child(5) {
	grid-column: 5 / 7;
	grid-row: 2;
}

.sixImageGrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 4px;
	width: 100%;
}

.sevenImageContainer {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
}

.sevenHero {
	display: grid;
	width: 100%;
}

.sevenGrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 4px;
	width: 100%;
}

.eightImageContainer {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
}

.eightTopRow {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	width: 100%;
}

.eightBottomGrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 4px;
	width: 100%;
}

.nineImageGrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 4px;
	width: 100%;
}

.tenImageContainer {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
}

.tenHero {
	display: grid;
	width: 100%;
}

.tenGrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 4px;
	width: 100%;
}

.twoImageGrid,
.threeImageGrid,
.fourImageGrid,
.fiveImageGrid,
.sixImageGrid,
.sevenImageContainer,
.sevenHero,
.sevenGrid,
.eightImageContainer,
.eightTopRow,
.eightBottomGrid,
.nineImageGrid,
.tenImageContainer,
.tenHero,
.tenGrid {
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

@media (max-width: 640px) {
	.twoImageGrid > *,
	.threeImageGrid > *,
	.fourImageGrid > *,
	.fiveImageGrid > *,
	.sixImageGrid > *,
	.sevenGrid > *,
	.eightTopRow > *,
	.eightBottomGrid > *,
	.nineImageGrid > *,
	.tenGrid > * {
		aspect-ratio: 1 / 1 !important;
	}
}
