@import "./fonts.css";
@import "./style.css";

:root {
	--button-font: sans-serif;
	--button-font-weight: 500;
	--button-color: #00000000;
	--button-text-color: #333;
	--button-color-positive: #00000080;
	--button-text-color-positive: #fff;
	--button-color-negative: #db5d5daa;
	--button-text-color-positive: #fff;
	--button-border-radius: 0.35rem;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	font-family: sans-serif;
	width: 100%;
	height: 100%;
	color: #333;
	line-height: 1.4;
	background: #333;
}

.text {
	line-height: 1.75;
}

x-app {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

x-app > * > .column {
	padding: 1.5rem;
	margin: auto;
	margin-top: unset;
}

x-app > * > .column.top {
	margin-top: unset;
}

@media (min-width: 768px) {
	x-app > * > .column.top {
		padding-bottom: 4rem;
	}
}

h1,h2,h3,h4,h5 {
	font-family: orpheus, serif;
	font-weight: 400;
	margin-top: 0;
	margin-bottom: 0;
}

a,
a:visited {
	color: #666;
}
a:hover,
a:active {
	color: #333;
}

form {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 1rem;
}

form.row {
	flex-direction: row;
	justify-content: space-around;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.field.row {
	flex-direction: row;
}

.field.row > * {
	width: 100%;
}

.field > .row {
	gap: 0.5rem;
}

label {
	font-size: 0.8rem;
	font-weight: 500;
	line-height: inherit;
}

label[for] {
	cursor: pointer;
}

input,
select,
.option {
	line-height: inherit;
	padding: 1rem;
	border-radius: var(--button-border-radius);
	border: 1px solid #e7e7e7;
	font-family: inherit;
	font-size: inherit;
	background-color: #fff;
	color: inherit;
	-webkit-appearance: none;
}
.option:hover,
.option[selected] {
	background-color: #eee;
}

select {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="rgb(51,51,51)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>');
	background-repeat: no-repeat;
	background-size: 0.9rem;
	background-position-x: calc(100% - 0.1rem);
	background-position-y: 50%;
	text-overflow: ellipsis;
}

input {
  -webkit-appearance: none;
}
input[type=checkbox],
input[type=radio] {
  -webkit-appearance: auto;
	padding: 0.5rem;
}

input::placeholder {
	color: #ccc;
}
input[type=number] {
  -moz-appearance: textfield;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input:focus,
select:focus,
button:focus,
.button:focus {
	outline: none;
}

input:disabled,
select:disabled {
	background-color: #eee;
}

button,
.button,
.button:active,
.button:visited {
	font-family: var(--button-font);
	font-weight: var(--button-font-weight);
	font-size: inherit;
	line-height: inherit;
	cursor: pointer;
	border-radius: var(--button-border-radius);
	background-color: var(--button-color);
	color: var(--button-text-color);
	appearance: none;
	-webkit-appearance: none;
	user-select: none;
	-webkit-user-select: none;
	padding: 1rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	text-align: center;
	text-decoration: none;
	border: 1px solid #000;
	letter-spacing: 0.05rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	touch-action: manipulation;
	backdrop-filter: blur(3px);
}

button[disabled] {
	opacity: 0.5;
	pointer-events: none;
}

button:hover,
.button:hover,
.button.hover {
	background-color: color-mix(in srgb, var(--button-color) 90%, black 10%);
	color: color-mix(in srgb, var(--button-text-color) 80%, black 20%);
}

button.positive,
.button.positive {
	background-color: var(--button-color-positive);
	color: var(--button-text-color-positive);
}

button.positive:hover,
.button.positive:hover,
.button.positive.hover {
	background-color: color-mix(in srgb, var(--button-color-positive) 80%, black 20%);
	color: color-mix(in srgb, var(--button-text-color-positive) 80%, white 20%);
}

button.negative,
.button.negative {
	background-color: var(--button-color-negative);
	border: 1px solid color-mix(in srgb, var(--button-color-negative) 80%, black 20%);
	color: var(--button-text-color-negative);
}

button.negative:hover,
.button.negative:hover,
.button.negative.hover {
	background-color: color-mix(in srgb, var(--button-color-negative) 80%, black 20%);
	color: color-mix(in srgb, var(--button-text-color-positive) 80%, white 20%);
}

button.link,
.button.link {
	padding: 0;
	background-color: none;
	text-decoration: underline;
	color: #999;
	letter-spacing: normal;
}

button.link:hover,
button.link.hover {
	color: #666;
}

button.short,
.button.short {
	padding-top: 0.2rem;
	padding-bottom: 0.2rem;
}

img {
	display: block;
}

.row,
.button.row {
	display: flex;
	flex-direction: row;
	gap: 1rem;
}
.button.row {
	min-height: 3.525rem;
}
.row input {
	width: 100%;
}
.row input[type=checkbox],
.row input[type=radio] {
	width: unset;
	margin: 0;
}

.row.spread {
	justify-content: space-between;
}

.row.spread > *:first-child {
	text-align: left;
}

.row.spread > *:last-child {
	text-align: right;
}

.row.fill > * {
	flex-grow: 1;
	flex-basis: 100%;
	min-width: 0;
}

.column {
	display: flex;
	gap: 1rem;
	flex-direction: column;
}
.column.tight {
	gap: 0.5rem;
}

.hidden {
	display: none !important;
}

.invisible {
	visibility: hidden;
}

.hide {
	opacity: 0;
	pointer-events: none;
}

.animate-bg {
	transition: background 0.3s;
}
