/* Tokens, reset, typography and form controls shared by the site and the block editor. */

:root {
	--zelena-900: #1d4521;
	--zelena-800: #23582a;
	--zelena-700: #2b7230;
	--zelena-600: #3a8a3c;
	--zelena-200: #cfe5c4;
	--zelena-100: #e5f1de;
	--zelena-50: #f3f9ef;
	--krem: #fffbea;
	--krem-200: #f6efd6;
	--krem-300: #e9dcb3;
	--oranzova: #f0a234;
	--oranzova-700: #9a5300;
	--oranzova-100: #fdeccf;
	--modra-700: #1d5bb8;
	--modra-100: #e2ecfa;
	--cervena-700: #b8322a;
	--cervena-100: #fde3e0;
	--text: #1c271d;
	--text-2: #4d594e;
	--tma: #141b15;
	--bila: #fff;

	--font-serif: var(--wp--preset--font-family--lora, Lora, Georgia, serif);
	--font-sans: var(--wp--preset--font-family--figtree, Figtree, system-ui, sans-serif);

	--radius-s: 0.625rem;
	--radius-m: 1rem;
	--radius-l: 1.5rem;
	--radius-xl: 2rem;
	--stin: 0 1px 2px rgb(20 40 20 / 0.06), 0 10px 30px rgb(20 40 20 / 0.1);
	--stin-maly: 0 1px 2px rgb(20 40 20 / 0.06), 0 4px 12px rgb(20 40 20 / 0.06);

	--sirka: 78rem;
	--sirka-textu: 46rem;
	--okraj: clamp(1rem, 4vw, 2rem);
	--prechod: 160ms ease;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 1rem;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--krem);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-serif);
	font-weight: 700;
	line-height: 1.2;
	color: var(--zelena-900);
	text-wrap: balance;
	margin: 1.6em 0 0.6em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.4rem); }
h4 { font-size: 1.125rem; }

p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

a {
	color: var(--zelena-700);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--zelena-900);
	text-decoration-thickness: 2px;
}

/* The ring needs 3:1 against what is behind it: dark green on light surfaces, cream on dark ones */
:root {
	--fokus: var(--zelena-900);
}

.hlavicka,
.navigace,
.menu-tlacitko,
.paticka,
.wp-block-group.is-style-vyzva {
	--fokus: var(--krem);
}

.hledani__panel {
	--fokus: var(--zelena-900);
}

@media (min-width: 64rem) {
	.navigace__podnabidka {
		--fokus: var(--zelena-900);
	}
}

:focus-visible {
	outline: 3px solid var(--fokus);
	outline-offset: 3px;
	border-radius: 4px;
}

.ikona {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	vertical-align: -0.25em;
}

.ikona--otocena {
	transform: rotate(180deg);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Form controls */

input,
select,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--krem-300);
	border-radius: var(--radius-s);
	background-color: var(--bila);
	transition: border-color var(--prechod), box-shadow var(--prechod);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
	border-color: var(--zelena-700);
	/* Solid, so the ring keeps 3:1 against the white field and the cream page */
	box-shadow: 0 0 0 2px var(--zelena-700);
}

/* One rule for every dropdown on the site: custom chevron inset from the right edge */
html body select:not([multiple]) {
	appearance: none;
	padding-right: 2.75rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232b7230' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	background-size: 1rem;
	cursor: pointer;
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

/* Buttons */

.tlacitko,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3rem;
	padding: 0.7rem 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--zelena-700);
	color: var(--bila);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--prechod), transform var(--prechod);
}

.tlacitko:hover,
.wp-block-button__link:hover {
	background: var(--zelena-900);
	color: var(--bila);
}

.tlacitko--svetle {
	background: var(--bila);
	color: var(--zelena-900);
}

.tlacitko--svetle:hover {
	background: var(--zelena-100);
	color: var(--zelena-900);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
