/*
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;
}

footer {
	background-color: #a57bb0;
	color: white;
	font-size: 0.8em;
	padding-top: 3rem;
    padding-bottom: 4rem;
}

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 chota-grid variables */
:root {
	--grid-maxWidth: 75rem;
	--grid-gutter: 1.25rem;
}

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

.section-event-display {
	width: auto;
	max-width: calc(min(100svh, 42rem));
	container-type: inline-size;
	margin-inline: auto;
}
.event-display {
	container-type: size;
	width: calc(min(100cqw, 100svh, 42rem));
	height: calc(min(100cqw, 100svh, 42rem) * 0.9);
	margin-inline: auto;
	display: grid;
	justify-items: center;
	align-items: end;
}
.event-square {
	container-type: size;
	grid-row: 1 / 2;
	grid-column: 1 / 2;
	width: 80%;
	aspect-ratio: 1;
	border: 0.4cqw solid #777777;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	padding: 3%;
	background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
	box-shadow:
		0 0.2cqw 0.2cqw hsl(0deg 0% 0% / 0.08),
		0 0.4cqw 0.4cqw hsl(0deg 0% 0% / 0.08),
		0 0.8cqw 0.8cqw hsl(0deg 0% 0% / 0.08),
		0 1.6cqw 1.6cqw hsl(0deg 0% 0% / 0.08),
		0 2.0cqw 3.2cqw hsl(0deg 0% 0% / 0.1),
		0 4.0cqw 6.4cqw hsl(0deg 0% 0% / 0.1),
		0 6.0cqw 12.8cqw hsl(0deg 0% 0% / 0.1),
		0 8.0cqw 25.6cqw hsl(0deg 0% 0% / 0.15);
}
.event-square > * {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1cqw;
	flex-wrap: nowrap;
	font-size: 3.7cqw;
}
.event-square .title h1 {
	margin: 2cqh 0 3cqh 0;
	font-family: inherit;
}
.event-square .date-and-time {
	
}
.event-square .timezone {
	font-size: 3cqw;
}
.event-square .rsvp {
	
}
.event-square .description {
	flex-grow: 1;
}
.event-square .description div {
	white-space: pre-wrap;
	text-align: center;
}

.section-image-credit {
    width: 100%;
	max-width: calc(min(100svh, 42rem));
    margin-inline: auto;
	display: flex;
	flex-flow: column nowrap;
	align-items: center;
	justify-content: center;
}
.section-image-credit div {
	width: 80%;
	text-transform: uppercase;
    font-weight: bold;
    font-size: 0.6rem;
    text-align: right;
    font-style: italic;
}

:root {
	--cal-scale: 1;
}
.calendar-buttons-display {
	display: grid;
	justify-items: center;
	align-items: center;
	justify-content: center;
}
.calendar-buttons {
	display: flex;
	flex-flow: column nowrap;
	font-size: calc(1rem * var(--cal-scale));
	gap: 0.5em;
	align-items: center;
	justify-content: center;
	margin-block-start: 2.5rem;
    margin-block-end: 2.5rem;
}

@media screen and (max-width: 35rem) {
	.event-display {
		width: calc(min(100cqw, 100svh, 42rem));
		height: calc(min(100cqw, 100svh, 42rem));
	}
	.event-square {
		width: 100%;
	}
	:root {
		--cal-scale: 0.7;
	}
	.section-image-credit div {
		width: 97%;
	}
}

.calendar-buttons-heading {
	text-transform: uppercase;
	font-size: 1em;
	font-weight: bold;
}
.calendar-buttons-list {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: center;
	row-gap: 1em;
	column-gap: 1.8em;
}
.calendar-button {
	background-color: white;
	border-radius: 5em;
	font-size: 1.2em;
	padding: 0.5em 1.1em 0.6em 1.1em;
	color: #4a4a4a;
	white-space: nowrap;
    word-break: keep-all;
    text-wrap: nowrap;
    text-wrap-mode: nowrap;
	box-shadow:
		0 0.1em 0.2em hsl(0deg 0% 0% / 0.1),
		0 0.3em 0.4em hsl(0deg 0% 0% / 0.1),
		0 0.4em 0.8em hsl(0deg 0% 0% / 0.1),
		0 1.0em 1.6em hsl(0deg 0% 0% / 0.1);
}
.calendar-button:visited {
	color: #4a4a4a;
}
.calendar-button:hover {
	color: #a57bb0;
	border-bottom: none;
	box-shadow:
		0 0.1em 0.2em hsl(0deg 0% 0% / 0.1),
		0 0.3em 0.4em hsl(0deg 0% 0% / 0.1),
		0 0.4em 0.8em hsl(0deg 0% 0% / 0.1),
		0 1.0em 1.6em hsl(0deg 0% 0% / 0.1),
		0 2.0em 3.2em hsl(0deg 0% 0% / 0.15);
}

.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 {
	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 {
	height: auto;
}

.section-edit {
	padding-inline: 13px;
}

.section-links {
	padding-inline: 13px;
}

.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;
}
.button-dark {
	background-color: #a57bb0;
	color: white;
}
.button:hover, .icon-button:hover {
	outline: 0;
}
.button-light:hover {
	background-color: #a57bb0;
	color: white;
}
.button-dark:hover {
	background-color: #794188;
}
.button-light:focus-visible {
	border: 1px solid #1d7484;
	outline: 0;
}
.button-dark:focus-visible {
	border: 2px solid black;
	outline: 0;
}


.time-input-clearable {
	display: flex;
	flex-direction: row;
	gap: 0.8em;
}
.time-input-clearable button.icon-button, .icon-button.timezone-details-toggle-label, .theme-rng-regenerable button.icon-button {
    width: calc(2em + 12px);
	min-width: calc(2em + 12px);
	max-width: calc(2em + 12px);
}
.time-input-clearable button.icon-button {
	margin-bottom: 10px;
}
.time-input-clearable svg.bi-x {
	height: 1.8em;
    width: 1.8em;
}

.timezone-input-collapsible {
	display: grid;
	column-gap: 0.8em;
	row-gap: 0;
	grid-template-columns: 1fr min-content;
	grid-template-areas: 
	    "input toggle"
	    "details details";
}
.timezone-input-collapsible .search-and-select-box {
	grid-area: input;
}
.timezone-details-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;
}
.timezone-details-toggle-label {
	grid-area: toggle;
}
.timezone-details {
	grid-area: details;
	height: 0;
	overflow: clip;
	transition: height 0.25s ease-in-out;
	margin-block-end: 10px;
}
.timezone-details-toggle:checked + .timezone-details-toggle-label + .timezone-details {
	/* expand the collapsible area whenever the checkbox is ticked */
	height: auto;
}
.timezone-details-toggle:focus-visible + .timezone-details-toggle-label {
	/* outline the label whenever anyone tabs to the original checkbox */
	border: 1px solid #1d7484;
    outline: 0;
}
.timezone-details-toggle-label svg.bi-info-circle {
	height: 1.3em;
    width: 1.3em;
}
.timezone-details-heading {
	margin-top: 0.8rem;
}

.theme-rng-regenerable {
	display: flex;
	flex-direction: row;
	gap: 0.8em;
}
.theme-rng-regenerable button.icon-button {
	margin-bottom: 10px;
}
.theme-rng-regenerable button.icon-button.floating-regenerate-button {
	position: fixed;
	aspect-ratio: 1;
    margin: 0;
	bottom: 1rem;
    left: 1rem;
	box-shadow:
		0 0.1cqw 0.2cqw hsl(0deg 0% 0% / 0.1),
		0 0.3cqw 0.4cqw hsl(0deg 0% 0% / 0.1),
		0 0.4cqw 0.8cqw hsl(0deg 0% 0% / 0.1),
		0 1.0cqw 1.6cqw hsl(0deg 0% 0% / 0.1),
		0 2.0cqw 3.2cqw hsl(0deg 0% 0% / 0.15);
	/* make the floating regenerate button hidden by default, then slide in and out smoothly when the edit section is expended/collapsed */
	visibility: hidden;
	transform: translate(-4em, 4em);
	transition: transform 0.15s ease-in-out, visibility 0.25s;
}
.section-collapsible.section-edit .section-heading-toggle:checked + .section-heading-toggle-label + .section-collapse button.icon-button.floating-regenerate-button {
	visibility: visible;
	transform: none;
}
.theme-rng-regenerable button.icon-button.floating-regenerate-button:focus-visible {
	border: none; /* hide focus. tabindex=-1 prevents tabbing to the button but it can still be focused after clicking. this styling makes the focus invisible */
}
.theme-rng-regenerable svg.bi-arrow-repeat {
	height: 1.3em;
    width: 1.3em;
}
.row.background-inputs .image-url, .row.background-inputs .theme {
	flex-grow: 10;
}
.row.background-inputs .rng {
	flex-grow: 1;
}

/* attempt to hide the native date picker. this only works on some platforms,
 * so other platforms will still show the date picker (this is the best we can do) */
.date-nopicker::-webkit-inner-spin-button,
.date-nopicker::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.row.result-button .col {
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
}
.row.result-button .col .button {
	min-width: 50%;
	padding: 6px 20px;
}

/* copy the form input styling from sakura.css and apply this to search-and-select boxes too */
.search-and-select-box .vs__dropdown-toggle {
	color: #4a4a4a;
    padding: 4px 1px 6px 1px;
    background-color: #f1f1f1;
    border: 1px solid #f1f1f1;
    border-radius: 4px;
    box-shadow: none;
    box-sizing: border-box;
}
.search-and-select-box .vs__dropdown-toggle:focus-within {
	border: 1px solid #1d7484;
	outline: 0;
}
/* fix clipped x and v buttons */
.search-and-select-box svg {
	max-width: revert;
}
/* fix subtly different font size inside search and select box between 'typing' and 'option selected' modes */
.search-and-select-box .vs__selected, .search-and-select-box .vs__selected:focus {
    line-height: var(--vs-line-height);
    font-size: var(--vs-font-size);
}
/* wrap overflow for long timezone names nicely (the default is messy) */
.search-and-select-box .vs__selected-options {
	flex-wrap: nowrap;
    container-type: inline-size;
}
.search-and-select-box .vs__selected {
	max-width: 90%;
	word-wrap: break-word;
	display: inline;
}

.links-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.url-preview-row, .url-preview {
    display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
}
.url-preview-row {
    flex-wrap: nowrap;
	gap: 0.8rem;
	align-items: stretch;
}
.url-preview {
	flex-grow: 1;
	gap: 0.4rem;
	padding: 0.6rem;
	border-radius: 4px;
	background-color: #f1f1f1;
	overflow-x: scroll;
	-webkit-overflow-scrolling: touch;
	flex-wrap: nowrap;
}
.url-preview:focus-visible {
	outline: 1px solid #1d7484;
}
.url-preview .url-base {
	text-transform: uppercase;
	font-size: 0.7em;
	font-weight: bold;
	color: #A57BB0;
	white-space: nowrap;
    word-break: keep-all;
    text-wrap: nowrap;
    text-wrap-mode: nowrap;
}
.url-preview .hash-icon-container {
	display: inline-grid;
	place-items: center;
}
.url-preview svg.hash-icon {
    grid-area: 1 / 2 / 1 / 2;
	min-width: 1.25rem;
	height: 1.25rem;
	width: 1.25rem;
	color: #A57BB0;
}
.url-preview .hash-text {
	grid-area: 1 / 2 / 1 / 2;
	font-size: 0.75rem;
	color: transparent;
}
.url-preview code {
	/*word-break: break-all;*/
	white-space: nowrap;
	flex-grow: 1;
	padding: 0;
}
.url-preview-row .icon-button.copy-button {
	width: calc(2em + 12px);
	min-width: calc(2em + 12px);
	max-width: calc(2em + 12px);
}
.url-preview-row .copy-button svg {
	height: 1.5rem;
	width: 1.5rem;
}

.url-stats, .timezone-details {
    display: flex;
	align-items: center;
	gap: 0.3125rem;
	font-size: 0.8em;
}
.url-stats {
	margin-block-end: 0.5em;
}
.url-stats {
	flex-direction: row;
	justify-content: center;
	flex-wrap: wrap;
}
.timezone-details {
	flex-direction: column;
	justify-content: start;
}
.url-stats .compatibility-heading, .timezone-details .timezone-details-heading {
	text-transform: uppercase;
	font-size: 0.8em;
	font-weight: bold;
}

.section-faq {
	padding-inline: 13px;
}
.section-faq p {
	font-size: 0.8em;
}

.footer-content {
	padding-inline: 13px;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 1rem;
}
.footer-content .footer-text {
	flex: 1 1 20rem;
	display: flex;
    flex-flow: column nowrap;
    gap: 1rem;
}
.footer-content .footer-text a {
	color: white;
	border-bottom: 1px solid white;
}
.footer-content .footer-text a:hover {
	color: white;
	border-bottom: 2px solid white;
}
.footer-content .footer-text a:visited {
	color: white;
	border-bottom: 1px solid white;
}
.footer-content .footer-links {
	display: flex;
	flex-flow: row wrap;
	column-gap: 1.4rem;
	overflow: clip;
}
/* add bullets automatically between footer items. based on https://stackoverflow.com/a/31220698 */
.footer-content .footer-links > span {
	position: relative;
}
.footer-content .footer-links > span:before {
	content: "";
    position: absolute;
    background-color: white;
    border-radius: 1em;
    width: 0.3rem;
    height: 0.3rem;
    left: calc(-0.7rem + -0.15rem);
	/* vertically center the bullet */
    margin-top: auto;
    margin-bottom: auto;
    top: 50%;
    bottom: 50%;
}
.footer-content .footer-icons-area {
	flex: 0 100 max-content;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	align-content: center;
	justify-content: center;
	gap: 1rem;
}
.footer-content .footer-icon {
	display: flex;
	padding: 0;
	margin: 0;
	flex: 0 0 auto;
	width: 5rem;
	align-items: center;
    justify-content: center;
}
.footer-content .footer-icon svg {
	border-radius: 0.5rem;
    height: calc((325 / 512) * 4rem);
    width: calc((512 / 512) * 4rem);
}
.footer-content .footer-icon-rect {
	height: 3rem;
}
.footer-content .footer-icon-circle {
	height: 5rem;
	background: white;
	border-radius: 6rem;
}
.footer-content a.footer-icon:hover, .footer-content a.footer-icon:visited {
	color: inherit;
    border-bottom: inherit;
}
