/*Тіло сторінки*/
body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 8px;
	padding: 5px 15px 15px;
	background-color: #666666;
	font-size: 14px;
	font-family: 'Open Sans', sans-serif;
	color: #ffffff;
}

body:fullscreen::backdrop {
	background-color: #666666;
}

body.debug * {
	border: solid 1px red;
	box-sizing: border-box;
}

*:link, *:visited, *:active {
    color: #ffffff;
    text-decoration-line: none;
}



/*Панелі примітки та меню*/
#head_panel {
	display: flex;
    justify-content: space-between;
	align-items: center;
}

#comment_panel {
	display: flex;
    flex-direction: column;
	color: #f0f0f0;
}

#comment_panel > * + * {
	margin-top: 5px;
}

#program_name {
	display: flex;
    align-items: center;
}

#menu_panel {
	display: flex;
    justify-content: flex-end;
	align-items: center;
}

#menu_panel > * {
	min-height: 14px;
}

#menu_panel > a:has(.fa-clock-rotate-left)[href=""], #menu_panel > a:has(.fa-list)[href=""] {
	display: none;
}



/*Поля заголовку*/
.title {
	margin: 15px 0 7px;
	text-align: center;
	font-size: 20px;
	font-weight: bold;
	text-transform: uppercase;
}

.subtitle {
	margin-top: 30px;
	text-align: center;
	font-size: 20px;
	font-weight: normal;
}



/*Сторінки*/
#login_page .title {
	margin-top: 100px;
	margin-bottom: 0;
}

#login_page table {
	margin-left: -30px;
}

#login_page input {
	width: 100%;
}

#login_page #error_label {
	padding-top: 8px;
	padding-left: 30px;
	text-align: center;
	color: #f04000;
	font-size: 14px;
}

#login_page .content_buttons {
	margin-top: 2px;
}

#login_page .btn {
	min-width: 80px;
}

#tracker_autocomplete_page form textarea {
	width: 500px;
}

#tracker_autocomplete_page .content_table td {
	padding: 5px 12px;
	text-align: center;
}

#errors_page .content_buttons .btn {
	min-width: 100px;
}

#map_edit_page .content_table:not(.editing_table) td, #user_edit_page .content_table:not(.editing_table) td {
	padding: 5px 7px;
}

#create_map_from_kml_page select, #create_map_from_kml_page input {
	width: 100%;
}



/*Сторінка адміністратора*/
#admin_page .content_table .btn {
	min-width: 185px;
}

#admin_page .content_table + .table_group {
	margin-top: 50px;
}

#objects_info [id], #resources_info [id], #speed_info [id] {
	min-width: 60px;
	text-align: center;
}

#objects_info [id]+td+[id], #resources_info [id]+td+[id], #speed_info [id]+td+[id] {
	min-width: 70px;
}

#histories_info [id] {
	min-width: 60px;
	text-align: center;
}

#end_date_info [id] {
	text-align: center;
}

#end_date_info:not(:has(td[id]:not(:empty))) {
	display: none;
}

#end_date_info tr:has(td[id]:empty + td[id]:empty) {
	display: none;
}

#end_date_info .no_critical_warning {
	background-color: orange;
}

#end_date_info .critical_warning {
	background-color: red;
}



/*Таблиці*/
.title + .content_table, .subtitle + .content_table {
	margin-top: 20px;
}

.content_table + .content_table {
	margin-top: 50px;
}

.content_table {
	align-self: center;
	border-collapse: collapse;
	font-size: 14px;
}

.desktop_center_align_table {
	align-self: center;
}

.table_group {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.table_group .content_table {
	align-self: self-start;
}

.table_group .content_table + .content_table {
	margin-top: 0px;
	margin-left: 45px;
}

.content_table td {
	padding: 5px 6px;
	border: 1px solid #ccc;
}

.menu_table td, .editing_table td {
	border: none;
}

.content_table thead {
	background-color: #555555;
	text-align: center;
	font-weight: bold;
	user-select: none;
}

.content_table thead td {
	padding: 4px 7px;
}

.content_table thead span {
    cursor: pointer;
}

.content_table thead span.sorting_asc:after {
    content: " \f106";
	font-family: FontAwesome;
}

.content_table thead span.sorting_desc:after {
    content: " \f107";
	font-family: FontAwesome;
}

.content_table i.grouping {
    margin-left: 7px;
	font-size: 16px;
	cursor: pointer;
}

.content_table select.grouping {
    position: absolute;
	padding: 2px;
	width: auto;
}

.content_table thead a {
	display: inline-block;
	padding: 0 10.5px;
	cursor: pointer;
}

.content_table thead a[href*="order=desc"], .content_table thead a[href*="order=asc"] {
	padding: 0;
}

.content_table thead a[href*="order=desc"]:after {
    content: "\f884";
	font-family: "Font Awesome 6 Free";
	margin-left: 5px;
}

.content_table thead a[href*="order=asc"]:after {
    content: "\f161";
	font-family: "Font Awesome 6 Free";
	margin-left: 5px;
}

.content_table thead .filter {
    margin-top: 2px;
	margin-left: 7px;
	float: right;
	font-size: 14px;
	cursor: pointer;
}

.content_table thead .filter select {
    position: absolute;
	padding: 2px;
	width: auto;
}

.content_table thead .filter:has(select option[selected]) .fa-filter {
	color: #2199c6;
}

.subbuttons_group {
	display: flex;
	justify-content: space-around;
}

.subbutton {
	margin: 5px 0 -5px;
	user-select: none;
	cursor: pointer;
}

tr:has(.editing_history_cell) td:first-child {
	vertical-align: top;
	padding-top: 10px;
}

.editing_history_cell > * {
	display: block;
}

.editing_history_cell > *:not(:first-child) {
	margin-top: 8px;
}

tr:has(.editing_history_cell input[value=""] + input[value=""]) {
	display: none;
}

.content_table td.comment {
	display: none;
	max-width: 400px;
}

.content_table:has(tbody td.comment:not(:empty)) td.comment {
	display: table-cell;
}

.content_table .btn:has(.fa-eye), .content_table .btn:has(.fa-eye-slash) {
	float: right;
}



/*Форми та поля введення*/
.title + form, .subtitle + form {
	margin-top: 15px;
}

.content_form {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

form input, form textarea, select, .dialog_message input, .custom_color input, .input {
	display: inline-block;
	padding: 5px;
	width: 300px;
	font-size: 14px;
	border: 1px solid #cccccc;
	border-radius: 3px;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}

form input:hover, form input:focus, form textarea:hover, form textarea:focus, select:hover, select:focus, .dialog_message input:hover, .dialog_message input:focus, .custom-color input:hover, .custom-color input:focus, .input:hover, .input:focus {
	border: 1px solid #b9b9b9;
    border-top-color: #a0a0a0;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
	outline: 0;
}

form .narrow_input {
	max-width: 110px;
}

form input[type='color'] {
	padding: 1px 4px;
}

form input[type="checkbox"] {
	width: 18px;
	height: 18px;
}

form input[readonly] {
	background-color: #bbbbbb;
}

form input:disabled, form select:disabled {
	color: black;
	background-color: #c0c0c0;
	opacity: 1;
}

form select option {
	padding: 0;
}



/*Нумерація сторінок*/
.pagination {
	display: flex;
	padding: 3px 3px 3px 0px;
}

.pagination .btn + .btn {
	margin-left: 2px;
}

.pagination > div:not(.btn) {
    display: flex;
    justify-content: flex-end;
    align-items: center;
	width: 100%;
}

.pagination .fa-backward-step, .pagination .fa-forward-step {
	padding-top: 1px;
}

.pagination .fa-caret-left, .pagination .fa-caret-right {
	font-size: 16px;
}



/*Кнопки*/
.btn {
	display: inline-block;
	margin: 5px;
	padding: 7px 14px;
	color: #ffffff;
	text-align: center;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	text-decoration: none;
	background-image: linear-gradient(to bottom, #23a1d1, #1f90bb);
	border: 1px solid #555555;
	border-radius: 4px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
	user-select: none;
	cursor: pointer;
}

.btn_ctrl {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 3px;
	padding: 0;
	width: 40px;
	height: 40px;
	font-size: 36px;
}

.btn:hover:not(.lock) {
	border-color: #cccccc;
}

.btn:active:hover:not(.lock) {
	background-image: linear-gradient(to bottom, #255b87, #204d74);
	border-color: #aaaaaa;
}

.btn_sel {
	background-image: linear-gradient(to bottom, #afa12a, #9b9025);
}

.btn_sel:active:hover:not(.lock) {
	background-image: linear-gradient(to bottom, #7f701e, #685c19);
}

.btn_inactive {
	background-image: linear-gradient(to bottom, #a0a0a0, #8c8c8c);
}

.btn_inactive:active:hover:not(.lock) {
	background-image: linear-gradient(to bottom, #7a7a7a, #666666);
}

.btn_wide {
	display: block;
	min-height: 16px;
}

td .btn {
	margin: 0;
}

.content_buttons {
	display: flex;
    justify-content: center;
	margin-top: 15px;
}



/*Перемикачі*/
.switch {
	display: flex;
	align-items: center;
}

.switch_button {
	display: inline-block;
	flex-shrink: 0;
	position: relative;
	width: 45px;
	height: 20px;
	background-color: #aaaaaa;
	border: 1px solid #555555;
	border-radius: 4px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
	overflow: hidden;
	cursor: pointer;
}

.switch.selected .switch_button {
	background-color: #229ac8;
	background-image: linear-gradient(to bottom, #23a1d1, #1f90bb);
	background-repeat: repeat-x;
}

.switch.disabled .switch_button {
	background-color: #808080;
	background-image: none;
}

.switch_button div {
	position: absolute;
	width: 35%;
	height: 100%;
	background-color: #cccccc;
}

.switch.selected .switch_button div {
	right: 0;
}

.switch_label {
	margin-left: 8px;
}



/*Вирівнювання Flex*/
.flex-center {
	display: flex;
	justify-content: center;
}

.flex-between {
	display: flex;
	justify-content: space-between;
}

.flex-around {
	display: flex;
	justify-content: space-around;
}

.flex-center-center {
	display: flex;
	justify-content: center;
	align-items: center;
}

.flex-between-center {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.flex-column {
	display: flex;
	flex-direction: column;
}

.flex-column-center {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.flex-column-between {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.flex-column-around {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
}

.flex-column-center-center {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}



/*Вирівнювання тексту*/
.align-left {
	text-align: left;
}

.align-center {
	text-align: center;
}

.align-right {
	text-align: right;
}



/*Зображення статуса та статистики*/
.status_picture_true, .status_picture_false {
	display: flex;
	justify-content: center;
    align-items: center;
	margin: 0 auto;
	padding: 2px 0 0 3px;
	width: 100%;
	height: 25px;
	color: black;
	font-size: 13px;
	border: solid 2px #444444;
	border-radius: 4px;
	box-sizing: border-box;
}

.status_picture_true {
	background-color: rgb(32, 255, 32);
}

.status_picture_false {
	background-color: rgb(255, 32, 32);
}



/*Інше*/
.hide {
	display: none !important;
}

.invisible {
	visibility: hidden;
}

.text_list p {
	margin: 5px 0 0;
}

.text_list p:first-of-type {
	margin: 0;
}

.layer_switches_list > *:not(:last-of-type) {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2px 0;
}

.layer_switches_list > *:not(:last-of-type) .btn {
	margin-left: 7px;
}

.layer_switches_list > *:last-of-type {
	display: flex;
	justify-content: flex-end;
	padding: 2px 0;
	font-weight: bold;
}

.resultDialog {
	display: flex;
	justify-content: center;
	align-items: center;
	position: fixed;
	padding: 10px 30px;
	background-color: #555555;
	border: 2px solid #cccccc;
	border-radius: 5px;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	opacity: 0;
	transition-property: all;
	transition-duration: 300ms;
    z-index: 1000;
}

#server_connection {
    position: absolute;
    bottom: 10px;
    padding: 4px 5px 4px 4px;
	color: #ffff40;
	background-color: rgba(0,0,0,0.5);
	border: 1px solid #ff6040;
}

.hide_part {
	cursor: pointer;
}

.hide_part ~ * {
	display: none;
}

.session_user_agent {
	width: 300px;
}

.editing_history_object_data, .bot_history_message {
	width: 400px;
}



/*На мобільних пристроях*/
@media (max-width: 1000px) {
	body {
		font-size: 28px;
	}
	
	.title, .subtitle {
		font-size: 40px;
	}

	.content_table, form input, form textarea, select, .dialog_message input {
		font-size: 28px;
	}
	
	.content_table:not(.menu_table, .editing_table) {
		align-self: normal;
	}

	.btn {
		font-size: 28px;
	}

	.btn_ctrl {
		font-size: 36px;
	}

	.error_label {
		font-size: 26px;
	}
}