/*
Copyright (C) 2026 amorphea

This file is part of Grevillea.

Grevillea 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.

Grevillea 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 Grevillea. If not, see <https://www.gnu.org/licenses/>.
*/

html {
	scrollbar-color: #a57bb0 #f9f9f9;
}

body {
	padding: 0;
	margin: 0;
	scrollbar-color: #a57bb0 #f1f1f1;
}

.main {
	margin-block-end: 5rem; /* for some reason this works in ".main {}" but not in "main {}". no idea why */
}

main, .footer-content {
	max-width: 42rem;
	margin: auto;
}

textarea { 
	resize: block;
	height: 10em;
}

input {
	width: 100%;
}


a {
	text-decoration: none;
	border-bottom: 1px solid #1d7484;
	color: #1d7484;
}
a:visited {
	color: #1d7484;
}
a:hover {
	color: #982c61;
	border-bottom: 2px solid #982c61;
}

[v-cloak] {
	display: none !important;
}

/* edit vue-select variables */
:root {
	--vs-font-size: 1em;
}

.caption {
	text-transform: uppercase;
	font-size: 0.8em;
	font-weight: bold;
}

.section-heading {
	line-height: 1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	font-weight: 700;
	margin-top: 0.25rem;
	margin-bottom: 0.25rem;
	overflow-wrap: break-word;
	word-wrap: break-word;
	-ms-word-break: break-all;
	word-break: break-word;
	font-size: 2rem;
}

.section-collapsible {
	display: grid;
	column-gap: 0.8rem;
	row-gap: 1rem;
	grid-template-columns: max-content min-content 1fr;
	grid-template-areas:
		"heading toggle empty"
		"collapse collapse collapse";
	margin-top: 2rem;
}
.section-collapsible .section-heading {
	grid-area: heading;
}
.section-collapsible .section-heading-toggle {
	/* Hide the original checkbox (the label is shown instead).
	 * Don't use "display: none" or "visibility: hidden" as those also make it get
	 * skipped when tabbing with a keyboard */
	grid-area: toggle;
	height: 10px;
	width: 10px;
	opacity: 0;
	z-index: -1;
}
.section-collapsible .section-heading-toggle-label {
	grid-area: toggle;
	width: 2.5rem;
	min-width: 2.5rem;
	max-width: 2.5rem;
}
.section-collapsible .section-collapse {
	grid-area: collapse;
	height: 0;
	overflow: clip;
	transition: height 0.25s ease-in-out;
}
.section-collapsible .section-heading-toggle-label svg {
	height: 1.3em;
	width: 1.3em;
	transition: transform 0.25s ease-out;
}
.section-collapsible .section-heading-toggle:checked + .section-heading-toggle-label + .section-collapse {
	/* expand the collapsible area whenever the checkbox is ticked */
	height: auto;
}
.section-collapsible .section-heading-toggle:checked + .section-heading-toggle-label svg {
	/* rotate the arrow icon whenever the checkbox is ticked */
	transform: rotate(0.25turn);
}
.section-collapsible .section-heading-toggle:focus-visible + .section-heading-toggle-label {
	/* outline the label whenever anyone tabs to the original checkbox */
	border: 1px solid #1d7484;
	outline: 0;
}

.section-collapsible.section-links .links-list {
	grid-area: collapse;
}
.section-collapsible.section-links .links-list .url-stats, .section-collapsible.section-links .links-list .url-title {
	height: 0;
	overflow: clip;
	transition: height 0.25s ease-in-out;
}
.section-collapsible.section-links .section-heading-toggle:checked + .section-heading-toggle-label + .links-list .url-stats,
.section-collapsible.section-links .section-heading-toggle:checked + .section-heading-toggle-label + .links-list .url-title {
	height: auto;
}

.button {
	border-radius: 4px;
	border: 0;
	cursor: pointer;
	box-sizing: border-box;
	padding: 6px 10px;
}
.icon-button {
	display: flex;
	padding: 0;
	margin: 0;
	border-radius: 4px;
	border: 0;
	cursor: pointer;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
}
.button-light {
	background-color: #f1f1f1;
	color: #4a4a4a;
}
a.button-light:visited {
	color: #4a4a4a;
}
.button-dark {
	background-color: #a57bb0;
	color: white;
}
a.button-dark:visited {
	color: white;
}
.button:hover,
.icon-button:hover,
a.button:hover,
a.icon-button:hover {
	outline: 0;
	border: none;
}
.button-light:hover {
	background-color: #a57bb0;
	color: white;
}
a.button-light:visited:hover {
	color: white;
}
.button-dark:hover {
	background-color: #794188;
}
.button-light:focus-visible,
a.button-light:focus-visible {
	outline: 1px solid #1d7484;
}
.button-dark:focus-visible,
a.button-dark:focus-visible {
	outline: 2px solid black;
}