/* --------------------------------------------------------------------------------------------------------------------- */
/* MEDIA QUERIES */
/* --------------------------------------------------------------------------------------------------------------------- */

@media screen and (min-width: 1300px)
{
	.section
	{
		width: 60%;
	}
}

@media screen and (max-width: 1300px)
{
	.section
	{
		width: 70%;
	}

	#content.content_grid
	{
		grid-template-areas:
			"subnav"
			"sidebar"
			"main";
	}

	#sidebar
	{
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-self: auto;
		justify-content: center;
		gap: 10px;
	}

	#sidebar_statistics
	{
		display: grid;
		grid-template-columns: auto;
		grid-template-rows: auto auto auto;
		justify-items: center;
	}

	#sidebar_statistics div
	{
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		justify-content: center;
	}

	#main_navigation a:not(:first-child)
	{
		display: none;
	}

	#main_navigation a#hamburger
	{
		display: block;
		float: right;
	}

	#main_navigation a#hamburger:before
	{
		content: "\e9bd";
	}

	#main_navigation.responsive a
	{
		float: none;
		display: block;
		text-align: left;
		line-height: 2rem;
	}

	#main_navigation.responsive a#hamburger
	{
		position: absolute;
		right: 0;
		top: 0;
	}

	#main_navigation.responsive a#navhome
	{
		margin-left: 0;
		margin-top: 10px;
	}
}

@media screen and (max-width: 900px)
{
	.section
	{
		width: 100%;
	}

	div.grid
	{
		grid-template-columns: 1fr;
		grid-template-rows: minmax(2em, auto) minmax(2.5em, 1fr);
		row-gap: 0;
	}

	fieldset#entryform div.grid_pedigree
	{
		grid-template-columns: auto minmax(80px, 1fr) auto minmax(80px, 1fr);
	}

	fieldset#entryform div.grid_pedigree label:first-of-type
	{
		grid-column: 1 / span 4;
	}

	fieldset#entryform div.grid_sex
	{
		grid-template-columns: auto auto auto auto 1fr;
	}

	fieldset#entryform div.grid_sex label:first-of-type
	{
		grid-column: 1 / span 5;
	}

	fieldset#entryform div.grid_birthdate
	{
		grid-template-columns: auto 1fr auto 1fr auto 1fr;
	}

	fieldset#entryform div.grid_birthdate label:first-of-type
	{
		grid-column: 1 / span 6;
	}

	fieldset#entryform div.grid_exhibition
	{
		grid-template-columns: auto 1fr;
	}

	fieldset#entryform div.grid_exhibition label:first-of-type
	{
		grid-column: 1 / span 2;
	}

	fieldset div.grid_search
	{
		grid-template-columns: 1fr;
	}
}


@media screen and (max-width: 900px)
{
	.section
	{
		width: 100%;
	}

	#content.grid
	{
		grid-template-columns: 0.5rem auto 0.5rem;
		grid-template-rows: 1rem auto auto 1rem;
		grid-template-areas:
			". . ."
			". main ."
			". sidebar ."
			". . .";
	}

	#content.column
	{
		grid-template-columns: 0.5rem auto 0.5rem;
		grid-template-rows: 1rem auto auto 1rem;
		grid-template-areas:
			". . ."
			". main ."
			". sidebar ."
			". . .";
	}

	#content.grid.home
	{
		grid-template-columns: 0.5rem auto 0.5rem;
		grid-template-rows: 1rem auto auto 1rem;
		grid-template-areas:
			". . ."
			". main ."
			". sidebar ."
			". . .";
	}

	/* #sidebar
	{
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px;
	} */

	#footer
	{
		flex-direction: column;
	}

	.announcement_item
	{
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		row-gap: 1rem;
		grid-template-areas:
			"image"
			"details";
	}

	#footer
	{
		flex-direction: column;
	}

	#footer div
	{
		margin-top: 1rem;
		margin-bottom: 1rem;
	}

	.tabel_full
	{
		display: none;
	}

	.tabel_half
	{
		display: table;
	}

	div.grid
	{
		grid-template-columns: 1fr;
		/* grid-template-rows: minmax(2rem, auto) minmax(2.5rem, 1fr); */
		row-gap: 0;
	}

	fieldset#entryform div.grid_pedigree
	{
		grid-template-columns: auto minmax(80px, 1fr) auto minmax(80px, 1fr);
	}

	fieldset#entryform div.grid_pedigree label:first-of-type
	{
		grid-column: 1 / span 4;
	}

	fieldset#entryform div.grid_sex
	{
		grid-template-columns: minmax(80px, 1fr) auto auto auto auto 1fr;
	}

	/* fieldset#entryform div.grid_sex label:first-of-type
	{
		grid-column: 1 / span 5;
	} */

	fieldset#entryform div.grid_birthdate
	{
		grid-template-columns: auto 1fr auto 1fr auto 1fr;
	}

	fieldset#entryform div.grid_birthdate label:first-of-type
	{
		grid-column: 1 / span 6;
	}

	fieldset#entryform div.grid_exhibition
	{
		grid-template-columns: auto 1fr;
	}

	fieldset#entryform div.grid_exhibition label:first-of-type
	{
		grid-column: 1 / span 2;
	}

	fieldset#entryform div.grid_exhibition p.error,
	fieldset#entryform div.grid_exhibition p.info
	{
		grid-column: 1 / span 2;
	}

	#sponsors_mobile
	{
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	#sponsors_mobile .partners
	{
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		justify-items: center;
		gap: 0.5rem;
	}

	#sponsors_mobile .partners a
	{
		display: flex;
	}
}

/* statistics: the administrator's dog list under a class count (oradea). A
   small round toggle before the class name opens a row with one card per dog,
   drawn like the breed cards around it. */
.stats_classes button.expand_details
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	margin: 0 0.5rem 0 0;
	padding: 0;
	border: 1px solid #b9cadb;
	border-radius: 50%;
	background: #fff;
	color: #1f6391;
	font-size: 0.95rem;
	line-height: 1;
	font-weight: 700;
	vertical-align: -0.2rem;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.stats_classes button.expand_details::before
{
	content: "+";
}

.stats_classes button.expand_details[aria-expanded="true"]::before
{
	content: "\2212";
}

.stats_classes button.expand_details:hover,
.stats_classes button.expand_details[aria-expanded="true"]
{
	border-color: #2980b9;
	background: #2980b9;
	color: #fff;
}

.stats_classes button.expand_details:focus-visible
{
	outline: 2px solid #2980b9;
	outline-offset: 2px;
}

/* The hidden details row is the table's last row, so the class row before it
   keeps no bottom border either. */
.stats_classes tbody tr:has(+ .stats_details_row.hidden:last-child) th,
.stats_classes tbody tr:has(+ .stats_details_row.hidden:last-child) td
{
	border-bottom: 0;
}

.stats_classes tr.stats_details_row > td,
.stats_classes tr.stats_details_row:hover > td
{
	padding: 0.6rem 0.9rem 0.75rem;
	background: #f5f8fb;
}

.stats_dogs
{
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.stats_dog
{
	margin: 0;
	padding: 0.6rem 0.8rem;
	border: 1px solid #dde6ee;
	border-radius: 6px;
	background: #fff;
}

.stats_dog_name
{
	margin: 0 0 0.4rem 0;
	font-size: 0.95rem;
	line-height: 1.3rem;
	font-weight: 700;
	color: #1b2a38;
}

.stats_dog_sex
{
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0 0.5rem;
	border-radius: 999px;
	background: #eef3f7;
	color: #5b6b7a;
	font-size: 0.7rem;
	line-height: 1.2rem;
	font-weight: 600;
	vertical-align: 0.1rem;
}

.stats_dog_sex_M
{
	background: #e3effa;
	color: #1f6391;
}

.stats_dog_sex_F
{
	background: #fbe7ef;
	color: #9b2c5a;
}

.stats_dog_fields
{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.35rem 1rem;
	margin: 0;
}

.stats_dog_field dt
{
	margin: 0;
	color: #5b6b7a;
	font-size: 0.68rem;
	line-height: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.stats_dog_field dd
{
	margin: 0;
	color: #1b2a38;
	font-size: 0.875rem;
	line-height: 1.25rem;
	overflow-wrap: anywhere;
}

.stats_dog_field dd a
{
	color: #1f6391;
}

.stats_dog_code
{
	color: #5b6b7a;
	font-size: 0.8rem;
}

.stats_dogs_status
{
	margin: 0;
	color: #5b6b7a;
	font-size: 0.875rem;
}

@media screen and (max-width: 600px)
{
	.stats_classes tr.stats_details_row > td
	{
		padding: 0.5rem 0.6rem 0.6rem;
	}

	.stats_dog_fields
	{
		grid-template-columns: minmax(0, 1fr);
	}
}
