form.admin,
form.login,
form.logout {
	margin-bottom: 15px;
	overflow: auto;
	background-color: #eee;
	padding: 10px;
	border-radius: 10px;
}

form.admin label {
	display: block;
	float: none;
	margin: 0 0 4px;
}

form.admin pre {
	font-family: monospace;
	display: inline;
}
form.login div {
	margin-bottom: 10px;
}

form.login label {
	display: block;
	margin: 0 0 5px;
}

form.login input[type="text"],
form.login input[type="password"] {
	width: 100%;
	margin: 0;
}

form.login input[type="submit"],
form.logout input[type="submit"] {
	margin: 0;
	width: 100px;
}

form.logout p {
	margin: 0 0 10px;
}

form.admin input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
form.admin select,
form.admin textarea {
	width: 100%;
	font-family: Open Sans, sans-serif;
	font-size: 10pt;
}

form.admin textarea.code {
	font-family: monospace;
	font-size: 10pt;
}

form.admin div {
	clear: both;
	overflow: visible;
	display: flow-root;
	margin-bottom: 10px;
}

form.admin label.noblock {
	display: inline;
	margin: 0 5px 0 0;
}

form.admin label span {
	color: #777;
	margin-left: 10px;
	/*float: right;*/
}

form.admin textarea {
	width: 100%;
	height: 150px;
	margin: 5px 0 0 0;
}

form.admin input[type="file"] {
	display: none;
}

form.admin input[type="date"] {
	width: auto;
}

form.admin input[type="time"] {
	width: auto;
}

form.admin input[type="number"] {
	width: 150px;
}

form.admin input[type="checkbox"], form input[type="radio"] {
	float: left;
	width: auto;
	margin-right: 5px;
	margin-top: 3px;
}

form.admin input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	float: none;
	display: inline-block;
	box-sizing: border-box;
	width: 52px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 15px;
	background: #e7e7e7;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease;
	vertical-align: middle;
}

form.admin input[type="checkbox"]::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
	transition: transform 0.18s ease;
}

form.admin input[type="checkbox"]:checked {
	background: #ffd735;
}

form.admin input[type="checkbox"]:checked::after {
	transform: translateX(22px);
}

form.admin input[type="checkbox"]:focus-visible {
	outline: 2px solid #d5a100;
	outline-offset: 2px;
}

form.admin input[type="button"],
form.admin input[type="submit"] {
	margin-right: 5px;
	margin-bottom: 0;
	padding: 5px 30px;
	width: 100px;
}
form.admin input[type="submit"] {
	margin-top: 5px;
}

form.admin {
	background-color: #fff;
	border: 2px solid #ccc;
}

form.admin .info {
	margin-left: 10px;
	display: none;
}

form.admin .ok {
	color: green;
	/*display: inline;*/
}

form.admin .error {
	color: red;
	/*display: inline;*/
}

form.admin .admin-table-wrap {
	clear: both;
	position: relative;
	overflow-x: auto;
	margin: 5px 0 0 0;
}

form.admin table.admin-table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	min-width: 760px;
	margin-bottom: 0;
	background: #fff;
	border: 1px solid #e1e4e9;
	border-radius: 8px;
	overflow: hidden;
}

form.admin table.admin-table th,
form.admin table.admin-table td {
	border: 0;
	border-right: 1px solid #e1e4e9;
	border-bottom: 1px solid #e1e4e9;
	padding: 4px;
	vertical-align: middle;
	background: #fafafa;
}

form.admin table.admin-table th {
	background: #fff2cb;
	text-align: left;
}

form.admin table.admin-table th:last-child,
form.admin table.admin-table td:last-child {
	border-right: 0;
}

form.admin table.admin-table tr:last-child td {
	border-bottom: 0;
}

form.admin table.admin-table input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
form.admin table.admin-table select,
form.admin table.admin-table textarea {
	box-sizing: border-box;
	margin: 0;
	width: 100%;
	min-height: 32px;
	padding: 5px 7px;
}

form.admin table.admin-table textarea {
	height: auto;
}

form.admin table.admin-table th.admin-table-user-login,
form.admin table.admin-table td.admin-table-user-login {
	min-width: 90px;
}

form.admin table.admin-table th.admin-table-user-name,
form.admin table.admin-table td.admin-table-user-name {
	min-width: 120px;
}

form.admin table.admin-table th.admin-table-user-password,
form.admin table.admin-table td.admin-table-user-password {
	min-width: 100px;
}

form.admin table.admin-table input[type="checkbox"] {
	width: 52px;
	margin: 0;
}

form.admin table.admin-table th.admin-table-combo,
form.admin table.admin-table td.admin-table-combo {
	min-width: 140px;
}

form.admin .admin-table-order,
form.admin .admin-table-drag {
	text-align: center;
	width: 55px;
}

form.admin .admin-table-drag {
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	color: #666;
	font-size: 18px;
}

form.admin .admin-table-drag--locked {
	cursor: default;
	color: #999;
}

form.admin tr.admin-table-row--protected td {
	background: #f4f4f4;
}

form.admin tr.admin-table-row--protected input[readonly],
form.admin tr.admin-table-row--protected input:disabled,
form.admin tr.admin-table-row--protected button:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

form.admin tr.admin-table-row.dragging .admin-table-drag {
	cursor: grabbing;
}

form.admin tr.admin-table-row.dragging {
	opacity: 0.45;
}

form.admin .admin-table-drop-marker {
	position: absolute;
	z-index: 5;
	height: 3px;
	background: #eab500;
	transform: translateY(-1px);
	pointer-events: none;
}

form.admin .admin-table-row-template {
	display: none;
}

form.admin .admin-table-actions {
	white-space: nowrap;
	width: 1%;
	text-align: center;
}

form.admin .admin-table-actions button,
form.admin .admin-table-add {
	padding: 3px 8px;
	width: 40px;
}

form.admin .admin-table-delete {
	min-width: 28px;
	font-size: 18px;
	line-height: 1;
}

form.admin table.admin-table th.admin-table-check,
form.admin table.admin-table td.admin-table-check {
	width: 1%;
	min-width: 0;
	max-width: none;
	padding-left: 4px;
	padding-right: 4px;
	text-align: center;
}

form.admin table.admin-table th.admin-table-check {
	padding-top: 4px;
	padding-bottom: 4px;
	font-size: inherit;
	line-height: inherit;
	white-space: nowrap;
	overflow-wrap: normal;
}

form.admin .admin-table-add {
	display: block;
	margin-top: 10px;
	margin-bottom: 0;
	min-width: 30px;
	font-size: 20px;
	line-height: 1;
}

form.admin .admin-table-wrap + span {
	display: block;
	margin-top: 10px;
}

/* Responzivní rozložení konfiguračních formulářů. */
form.admin.config-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

form.admin.config-form:has(~ form.admin.config-form) {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #ddd;
}

form.admin.config-form > h4 {
	grid-column: 1 / -1;
}

form.admin.config-form > h4 {
	margin: 0;
}

form.admin.config-form .config-item {
	min-width: 0;
	clear: none;
	margin: 0;
}

form.admin.config-form .config-item--compact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 12px;
	align-items: center;
	padding: 8px 10px;
	border: 1px solid #e1e4e9;
	border-radius: 8px;
	background: #fafafa;
}

form.admin.config-form .config-item--compact label,
form.admin.config-form .config-item--compact label.noblock {
	display: block;
	margin: 0;
}

form.admin.config-form .config-item--compact input[type="date"],
form.admin.config-form .config-item--compact input[type="time"],
form.admin.config-form .config-item--compact select {
	width: 140px;
	margin: 0;
	justify-self: end;
}

form.admin.config-form .config-item--compact input[type="checkbox"],
form.admin.config-form .config-item--compact input[type="radio"] {
	float: none;
	margin: 0;
	justify-self: end;
}

form.admin.config-form .config-item--wide {
	grid-column: 1 / -1;
}

form.admin.config-form .config-item--table,
form.admin.config-form .config-item--textarea,
form.admin.config-form .config-item--textarea-md {
	grid-column: 1 / -1;
}

form.admin.config-form .config-item--wide label {
	display: block;
	margin: 0 0 6px;
}

form.admin.config-form .config-item--wide input[type="text"],
form.admin.config-form .config-item--wide textarea {
	width: 100%;
	margin: 0;
}

form.admin.config-form .config-item--wide textarea {
	height: 150px;
}

form.admin.config-form .markdown-editor {
	clear: none;
	overflow: hidden;
	display: block;
	margin: 0;
	border: 1px solid #c8cdd4;
	border-radius: 6px;
	background: #fff;
}

form.admin.config-form .markdown-editor-toolbar {
	clear: none;
	overflow: visible;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	min-height: 42px;
	margin: 0;
	padding: 6px;
	border-bottom: 1px solid #c8cdd4;
	background: #f3f4f6;
}

form.admin.config-form .markdown-editor-toolbar button {
	width: auto;
	min-height: 30px;
	margin: 0;
	padding: 4px 9px;
	border: 1px solid #b9c0c9;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font: inherit;
	cursor: pointer;
}

form.admin.config-form .markdown-editor-toolbar button:hover:not(:disabled) {
	background: #e8ebef;
}

form.admin.config-form .markdown-editor-toolbar button:focus-visible,
form.admin.config-form .markdown-editor textarea:focus-visible,
form.admin.config-form .markdown-editor-preview:focus-visible {
	outline: 2px solid #2468d3;
	outline-offset: -2px;
}

form.admin.config-form .markdown-editor-toolbar button:disabled {
	border-color: #d7dbe0;
	background: #eceef1;
	color: #9aa1aa;
	cursor: default;
}

form.admin.config-form .markdown-editor-bold {
	font-weight: bold;
}

form.admin.config-form .markdown-editor-italic {
	font-style: italic;
}

form.admin.config-form .markdown-editor-toolbar .markdown-editor-toggle {
	margin-left: auto;
	border-color: #2764aa;
	color: #1f5797;
	font-weight: 600;
}

form.admin.config-form .markdown-editor-toolbar .markdown-editor-toggle[aria-pressed="true"] {
	background: #2764aa;
	color: #fff;
}

form.admin.config-form .markdown-editor textarea,
form.admin.config-form .markdown-editor-preview {
	display: block;
	width: 100%;
	height: 220px;
	min-height: 150px;
	margin: 0;
	padding: 12px;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #222;
}

form.admin.config-form .markdown-editor textarea {
	resize: vertical;
	font-family: monospace;
}

form.admin.config-form .markdown-editor-preview {
	overflow: auto;
}

form.admin.config-form .markdown-editor textarea[hidden],
form.admin.config-form .markdown-editor-preview[hidden] {
	display: none;
}

form.admin.config-form .markdown-editor-preview h1,
form.admin.config-form .markdown-editor-preview h2,
form.admin.config-form .markdown-editor-preview h3,
form.admin.config-form .markdown-editor-preview p,
form.admin.config-form .markdown-editor-preview ul {
	margin-top: 0;
}

form.admin.config-form .markdown-editor-empty {
	color: #777;
}

form.admin.config-form .markdown-editor-status {
	clear: none;
	display: block;
	min-height: 20px;
	margin: 0;
	padding: 3px 8px;
	color: #777;
	font-size: 9pt;
}

form.admin.config-form .markdown-editor-status.error {
	color: #a40000;
}

form.admin.config-form .config-item > .config-description {
	display: block;
	grid-column: 1 / -1;
	margin-top: 4px;
	color: #777;
	font-size: inherit;
}

form.admin.config-form .config-actions {
	display: flex;
	grid-column: 1 / -1;
	align-items: center;
	gap: 10px;
	margin: 0;
}

form.admin.config-form .config-actions input[type="submit"] {
	margin: 0;
}

form.admin.config-form .config-actions .info {
	margin: 0;
}

form.admin.config-form .config-number-control {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 22px;
	grid-template-rows: 16px 16px;
	width: 118px;
	justify-self: end;
}

form.admin.config-form .config-number-control input[type="number"] {
	grid-row: 1 / -1;
	width: 100%;
	min-width: 0;
	margin: 0;
	appearance: textfield;
	-moz-appearance: textfield;
}

form.admin.config-form .config-number-control input[type="number"]::-webkit-inner-spin-button,
form.admin.config-form .config-number-control input[type="number"]::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

form.admin.config-form .config-number-step {
	width: 22px;
	height: 16px;
	min-height: 0;
	padding: 0;
	border: 1px solid #d8dde6;
	border-radius: 0;
	background: #f2f2f5;
	box-shadow: none;
	font-size: 8px;
	line-height: 1;
}

form.admin.config-form .config-number-step--up {
	border-radius: 0 5px 0 0;
	border-bottom: 0;
}

form.admin.config-form .config-number-step--down {
	border-radius: 0 0 5px 0;
}

form.admin.config-form .config-number-step:hover {
	background: #e7e8ed;
}

@media (max-width: 699px) {
	form.admin.config-form {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 10px;
	}
}
/* Přihlašovací a odhlašovací formulář: na šířku vlevo, na telefonu na výšku přes celou šířku. */
form.login,
form.logout {
    width: min(100%, 360px);
}

@media (max-width: 480px) and (orientation: portrait) {
    form.login,
    form.logout {
        width: 100%;
    }
}
