@import "./nav/index.css";
@import "./log/index.css";
@import "./home/index.css";
@import "./chats-index/index.css";
@import "./chats-single/index.css";
@import "./models-index/index.css";
@import "./models-single/index.css";
@import "./not-found/index.css";

* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

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

x-app {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding-top: env(safe-area-inset-top);
	padding-bottom: env(safe-area-inset-bottom);
	padding-left: env(safe-area-inset-left);
	padding-right: env(safe-area-inset-right);
}

html.display-mode-standalone x-app {
	min-height: 100vh;
}

x-app > * > .column {
	padding: 2rem;
	padding-bottom: 8rem;
	margin: auto;
}

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: inherit;
	font-weight: 400;
	margin-top: 0;
	margin-bottom: 0;
}

h3 {
	font-size: 1.25rem;
}

a,
a:visited {
	color: #888;
}
a:active {
	color: #666;
}
@media (hover: hover) {
	a:hover {
		color: #666;
	}
}

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: 0.5rem;
	border: 1px solid #e7e7e7;
	font-family: inherit;
	font-size: inherit;
	background-color: #fff;
	color: inherit;
	-webkit-appearance: none;
}
.option[selected] {
	background-color: #eee;
}
.option:active {
	background-color: #eee;
}
@media (hover: hover) {
	.option:hover {
		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: inherit;
	font-weight: 400;
	font-size: inherit;
	line-height: inherit;
	cursor: pointer;
	border-radius: 0.5rem;
	background-color: #65b672;
	border: 0;
	color: #fff;
	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 transparent;
	letter-spacing: 0.05rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	touch-action: manipulation;
}

button[disabled] {
	opacity: 0.5;
	pointer-events: none;
}
button:active,
.button:active,
.button.active {
	background-color: #488e53;
	color: #fff;
}
@media (hover: hover) {
	button:hover,
	.button:hover {
		background-color: #488e53;
		color: #fff;
	}
}

button.neutral,
.button.neutral {
	background-color: #888;
}
button.neutral:active,
.button.neutral:active,
.button.neutral.active {
	background-color: #666;
}
@media (hover: hover) {
	button.neutral:hover,
	.button.neutral:hover {
		background-color: #666;
	}
}

button.negative,
.button.negative {
	background-color: #ff6c6c;
}
button.negative:active,
.button.negative:active,
.button.negative.active {
	background-color: #ff2c2c;
}
@media (hover: hover) {
	button.negative:hover,
	.button.negative:hover {
		background-color: #ff2c2c;
	}
}

button.link,
.button.link {
	padding: 0;
	background-color: none;
	text-decoration: underline;
	color: #999;
	letter-spacing: normal;
}
button.link:active,
button.link.active {
	color: #666;
}
@media (hover: 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;
}

x-editable #controls {
	gap: 0.5rem;
	justify-content: flex-end;
}

button.small,
.button.small,
x-editable #controls > button {
	font-size: 0.8rem;
	padding: 0.5rem;
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}
