/**
 * Theme Name: Inchi
 * Theme URI: https://inchi.lv
 */

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

.wp-block-button__link,
.wp-element-button {
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, outline-color 0.15s ease;
}

img,
video,
svg {
	display: block;
	max-width: 100%;
}

:not(pre) > code {
	background-color: var(--wp--preset--color--accent);
	border-radius: 0.25rem;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--monospace-code);
	font-size: 0.875em;
	padding: 0.1em 0.35em;
}

pre {
	background-color: var(--wp--preset--color--accent);
	border-radius: 0.33rem;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--monospace-code);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
	overflow-x: auto;
	padding: 1rem 1.25rem;
}

kbd {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent);
	border-bottom-width: 2px;
	border-radius: 0.25rem;
	font-family: var(--wp--preset--font-family--monospace-code);
	font-size: 0.875em;
	padding: 0.1em 0.4em;
}

mark {
	background-color: var(--wp--preset--color--accent);
	border-radius: 0.15em;
	color: var(--wp--preset--color--contrast);
	padding: 0.05em 0.2em;
}

abbr[title] {
	cursor: help;
	text-decoration: underline dotted;
	text-underline-offset: 2px;
}

del {
	opacity: 0.6;
}

ins {
	color: var(--wp--preset--color--forest-green);
	text-decoration: none;
}

sub,
sup {
	font-size: 0.75em;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

small {
	font-size: var(--wp--preset--font-size--small);
}

address {
	font-style: normal;
	line-height: 1.6;
}

blockquote {
	border-left: 2px solid var(--wp--preset--color--kimchi-red);
	font-style: italic;
	margin: 0;
	padding-left: 1rem;
}

table {
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
	width: 100%;
}

th,
td {
	border: 1px solid var(--wp--preset--color--accent);
	padding: 0.6rem 0.75rem;
	text-align: left;
	vertical-align: top;
}

th {
	background-color: var(--wp--preset--color--accent);
	font-weight: 500;
}

details {
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 0.33rem;
	padding: 0.6rem 0.75rem;
}

summary {
	cursor: pointer;
	font-weight: 500;
	list-style: none;
}

summary::-webkit-details-marker {
	display: none;
}

details[open] > summary {
	margin-bottom: 0.6rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select {
	appearance: none;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 0.33rem;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--system-ui);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	max-width: 100%;
	outline: 2px solid transparent;
	outline-offset: 2px;
	padding: 0.6rem 0.75rem;
	transition: border-color 0.15s ease, outline-color 0.15s ease;
	width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus {
	border-color: var(--wp--preset--color--forest-green);
	outline-color: var(--wp--preset--color--forest-green);
}

select {
	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='%23101010' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-position: right 0.75rem center;
	background-repeat: no-repeat;
	background-size: 1rem;
	cursor: pointer;
	padding-right: 2.5rem;
}

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

fieldset {
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 0.33rem;
	margin: 0;
	padding: 1rem 1.25rem;
}

legend {
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--system-ui);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	padding: 0 0.4rem;
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--wp--preset--color--kimchi-red);
	cursor: pointer;
	height: 1rem;
	width: 1rem;
}

input[type="range"] {
	accent-color: var(--wp--preset--color--kimchi-red);
	cursor: pointer;
	width: 100%;
}

input[type="color"] {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 0.33rem;
	cursor: pointer;
	height: 2.25rem;
	padding: 0.15rem;
	width: 3rem;
}

input[type="file"] {
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--system-ui);
	font-size: var(--wp--preset--font-size--small);
}

input[type="file"]::file-selector-button {
	background-color: var(--wp--preset--color--kimchi-red);
	border: none;
	border-radius: 0.33rem;
	color: var(--wp--preset--color--base);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--system-ui);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	margin-right: 0.75rem;
	padding: 0.5rem 0.75rem;
	transition: background-color 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
	background-color: var(--wp--preset--color--forest-green);
}

::placeholder {
	color: var(--wp--preset--color--contrast);
	opacity: 0.4;
}

input:disabled,
textarea:disabled,
select:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

label > input,
label > select {
	width: auto;
}