/* Response panel */
.panel {
	padding: 1.25rem var(--gutter) 1.5rem;
	background: var(--panel-bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	backdrop-filter: blur(8px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.panel h2 {
	font-size: 1.5rem;
	text-align: center;
	margin-bottom: 1rem;
}

.head-answer-section {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.head-answer-section img {
	width: 80px;
}

/* Responses given */
.responses-given {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.responses-given p {
	font-size: 0.9rem;
	color: var(--soot);
	margin: 0;
	border-radius: var(--radius);
	padding: 0.2rem 0.4rem;
}

/* Tabs */
.tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--line);
}

.tabs button {
	appearance: none;
	padding: 0.75rem 0.5rem;
	font: 500 1.05rem var(--font-ui);
	color: var(--ash);
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	transition:
		color 0.2s,
		border-color 0.2s;
}

.tabs button:disabled {
	cursor: not-allowed;
}

.tabs button:not(:disabled):hover {
	color: var(--bone);
}

.tabs button.search-by-image[aria-selected="true"] {
	color: var(--ember);
	border-bottom-color: var(--ember);
}

.tabs button.search-by-image:focus-visible {
	outline: 2px solid var(--ember);
	outline-offset: -2px;
}

.tabs button.search-by-sound[aria-selected="true"] {
	color: var(--ashen-estus);
	border-bottom-color: var(--ashen-estus);
}

.tabs button.search-by-sound:focus-visible {
	outline: 2px solid var(--ashen-estus);
	outline-offset: -2px;
}

/* Scrollbar */
/* Barre de scroll */
.scrollbar {
	max-height: 71vh;
	overflow-y: auto; /* Active le scroll vertical si nécessaire */
	overflow-x: hidden; /* Empêche le scroll horizontal */
}

/* Edit scrollbar on Chromium software */
.scrollbar::-webkit-scrollbar {
	width: 8px; /* Épaisseur verticale */
}

.scrollbar::-webkit-scrollbar-track {
	background: transparent; /* Couleur du fond */
	border-radius: 10px;
}

.scrollbar::-webkit-scrollbar-thumb {
	background: #888; /* Couleur de la barre */
	border-radius: 10px;
}

/* Scrollbar pour Firefox */
.scrollbar {
	scrollbar-width: auto; /* "auto" (par défaut), "thin" (fine) ou "none" (cachée) */
	scrollbar-color: #888 transparent; /* (barre, fond) */
}

/* Choices (Grid of games) */
.choices[hidden] {
	display: none;
}

.games {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	gap: 0.75rem;
}

.searchbar {
	display: flex;
	padding: 0.85rem 1rem;
	border: none;
	border-radius: 5px;
	color: var(--bone);
}

.top-gap {
	margin-top: 1.2rem;
}

.bottom-gap {
	margin-bottom: 1.2rem;
}

.searchbar.search-by-image {
	background-color: var(--ember-glow);
}

.searchbar.search-by-sound {
	background-color: var(--ashen-estus-glow);
}

/* Hide radios and keep them accessible */
.game-choice input,
.place-choice input,
.theme-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.game-choice,
.place-choice,
.theme-choice {
	position: relative;
	cursor: pointer;
}

.game-choice img {
	width: 100%;
	height: auto;
	border: 3px solid transparent;
	border-radius: var(--radius);
	filter: brightness(0.85);
	transition:
		border-color 0.2s,
		filter 0.2s,
		box-shadow 0.2s;
}

.game-choice:hover img {
	filter: brightness(1.05);
}

.game-choice.search-by-image input:checked + img {
	border-color: var(--ember);
	filter: brightness(1.05);
	box-shadow: 0 0 22px var(--ember-glow);
}

.game-choice.search-by-sound input:checked + img {
	border-color: var(--ashen-estus);
	filter: brightness(1.05);
	box-shadow: 0 0 22px var(--ashen-estus-glow);
}

.game-choice input:focus-visible + img {
	outline: 3px solid var(--bone);
	outline-offset: 3px;
}

/* Choices (list of places) */
.places {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.place-choice span {
	display: block;
	padding: 0.85rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(236, 228, 211, 0.04);
	transition:
		border-color 0.2s,
		background 0.2s,
		color 0.2s;
}

.place-choice:hover span {
	background: rgba(236, 228, 211, 0.09);
}

.place-choice.search-by-image input:checked + span {
	border-color: var(--ember);
	background: rgba(224, 160, 74, 0.14);
	color: var(--ember);
}

.place-choice.search-by-sound input:checked + span {
	border-color: var(--ashen-estus);
	background: rgba(131, 205, 227, 0.14);
	color: var(--ashen-estus);
}

.place-choice input:focus-visible + span {
	outline: 3px solid var(--bone);
	outline-offset: 2px;
}

.section-name {
	font-family: var(--font-title);
	font-size: 1.25rem;
	font-weight: bold;
	color: var(--bone);
	text-align: center;
	margin-top: 1rem;
	margin-bottom: 0.2rem;
}

@media (min-width: 545px) {
	.scrollbar.extended {
		max-height: 92vh;
	}
}

@media (min-width: 600px) {
	.head-answer-section img {
		width: 100px;
	}

	.games {
		grid-template-columns: repeat(2, 1fr);
	}
}
