/* src/app.css or any global CSS file */
:root {
	--color-white: white;
	--color-black: black;

	/* neutral */
	--color-neutral-deep: #404040;
	--color-neutral-dark: #9d9d9d;
	--color-neutral-medium: #d9d9d9;
	--color-neutral-light: #ebe8e9;

	/* primary */
	--color-primary-midnight: #2d3e4f;
	--color-primary-deep: #295566;
	--color-primary-dark: #4389a2;
	--color-primary-medium: #59abbe;
	--color-primary-light: #85c0b2;

	/* secondary */
	--color-secondary-deep: #ce3f28;
	--color-secondary-dark: #dd8530;
	--color-secondary-medium: #f2cd39;

	/* tertiary */
	--color-tertiary-medium: #72b749;

	/* whole colors */
	--color-whole-whole: #3dacc0;
	--color-whole-good: #b0d59d;
	--color-whole-ok: #ffffff;
	--color-whole-risk: #f8df8c;
	--color-whole-danger: #ea9184;

	/* buttons */
	--color-standard-text: var(--color-black);
	--button-primary-bg: var(--color-primary-medium);
	--button-dropdown-bg: var(--color-secondary-dark);
	--button-navigation-bg: var(--color-secondary-medium);
	--button-cancel-bg: var(--color-secondary-deep);

	/* misc */
	--light-weight: 300;
}

/* https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
*,
*::before,
*::after {
	box-sizing: inherit;
}
html {
	box-sizing: border-box;
}
html,
body {
	font-family: 'Lexend Deca', sans-serif;
	font-optical-sizing: auto;
	font-weight: 300;
	color: var(--color-neutral-deep);
	line-height: 1.625rem;
	margin: 0px;
}
body {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
	min-height: 100vh;
	background-color: #fafafa;
}
textarea,
input,
button {
	font-family: 'Lexend Deca', sans-serif;
}

hr {
	width: 100%;
	height: 1px;
	background-color: var(--color-neutral-light);
	border: none;
}

a {
	color: var(--color-standard-text);
}

:not(article) {
	p,
	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		margin: 0;
	}
}

h1,
h2,
h3 {
	font-family: 'Lexend Deca', sans-serif;
	font-weight: 600;
	line-height: 1;
}
h1,
.h1 {
	font-size: 2.125rem;
}
h2,
.h2 {
	font-size: 1.625rem;
}
h3,
.h3 {
	font-size: 1.25rem;
}
h1:first-child,
h2:first-child,
h3:first-child {
	margin-top: 0;
}
/* font variants */
.standard-text {
	font-size: 0.875rem;
	font-weight: 300;
}
/* Button Base Styles */
.btn {
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--color-standard-text);
	border: none;
	padding: 0 1.5rem;
	cursor: pointer;
	white-space: nowrap;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 500;
}
/* Button Variants */
.btn.neutral {
	background-color: var(--color-neutral-light);
	color: var(--color-black);
}
.btn.primary {
	background-color: var(--button-primary-bg);
	color: var(--color-white);
}
.btn.dropdown {
	background-color: var(--button-dropdown-bg);
	color: var(--color-white);
}
.btn.navigation {
	background-color: var(--button-navigation-bg);
	color: var(--color-black);
}
.btn.danger {
	background-color: var(--button-cancel-bg);
	color: var(--color-white);
}
.btn.disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 3.2rem;
	height: 3.2rem;
	animation-name: spin;
	animation-duration: 1000ms;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.max-content {
	max-width: 1600px;
}

/* Form controls */
select,
input[type='text'],
input[type='date'],
input[type='email'],
input[type='password'],
textarea {
	background-color: #fff;
	border: 2px solid var(--color-neutral-medium);
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	line-height: 1.5;
	min-height: 40px;
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--color-primary-dark);
	box-shadow: 0 0 0 3px var(--color-neutral-light);
	outline: none;
}

select {
	background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='currentColor' stroke-width='4' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1em;
	padding-right: 2rem;
	appearance: none;
}

input[type='submit'] {
	background-color: var(--color-primary-dark);
	color: white;
	border-radius: 6px;
	padding: 0.875rem 1.5rem;
	border: none;
	cursor: pointer;
}

input[type='submit']:focus {
	box-shadow: 0 0 0 3px var(--color-neutral-light);
	outline: none;
}
