@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@keyframes move {
	0% { transform: translateX(-300px); }
	100% { transform: translateX(120vw); }
}

* {
	font-family: "Courier Prime", monospace;
	font-weight: 400;
	overscroll-behavior: contain;
}

body {
	padding: 0;
	margin: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
}

#loading {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10000;
	background: white url("../img/logo-loading.svg") no-repeat fixed center;
	background-size: clamp(10px, 80vw, 600px) auto !important;
	overflow: hidden;
}

#loadingText {
	margin: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	transform: translateY(80px);
}

#loading_train {
	width: 300px;
	height: 300px;
	background: url("../img/logo.svg") no-repeat center;
	background-size: 100% auto;
	animation: move 1.2s cubic-bezier(.55,.06,.68,.19);
	animation-delay: 0.05s;
	animation-fill-mode: forwards;
	transform: translateX(-300px);
}

#loading_train:before {
	content: "";
	display: inline-block;
	width: 120vw;
	height: 100%;
	background: white;
	transform: translateX(-120vw);
}

#map {
	width: 100%;
	height: 100%;
	z-index: 10;
}

#map span {
	font-size: 18px;
}

#overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-size: 18px;
}

#beta_popup {
	padding: 10px;
	width: calc(100% - 20px);
	position: absolute;
	top: 10px;
	left: 10px;
	box-sizing: border-box;
	background: #e5e9ed;
	border-radius: 12px;
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.8);
	font-size: 16px;
	overflow: hidden;
	z-index: 1000;
}

#beta_close {
	width: 20px;
	height: 20px;
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	background: red;
	border-radius: 25%;
	cursor: pointer;
	color: white;
	font-family: sans-serif;
	font-size: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
}

#full_logo {
	height: 50px;
	width: 370px;
	max-width: 40%;
	position: absolute;
	bottom: 10px;
	left: 15px;
	background: url("../img/logo-with-text.svg") no-repeat center;
	background-size: contain;
	z-index: 100;
	backdrop-filter: blur(2px);
	border-radius: 8px;
}

#setting_element {
	margin: 10px;
	height: 44px;
	width: 44px;
	background-color: #fff;
	position: absolute;
	top: 0;
	right: 0;
	border: 2px solid rgba(0,0,0,0.2);
	border-radius: 5px;
	background-clip: padding-box;
	cursor: pointer !important;
	z-index: 10;
}

#setting_icon {
	display: flex;
	width: 100%;
	height: 100%;
	justify-content: center;
	align-items: center;
	font-size: 30px;
	color: #333c;
	text-shadow: 2px 2px 2px #999;
}

#setting_popup {
	padding: 10px;
	border-radius: 12px;
	position: absolute;
	top: 50px;
	right: 0;
	width: 600px;
	max-width: calc(100vw - 40px);
	background: #e5e9ed;
	box-shadow: 0 3px 14px rgba(0,0,0,0.8);
	font-size: 14px;
	white-space: break-spaces;
	cursor: default !important;
}

#setting_popup div {
	margin-bottom: 8px;
}

#setting_popup label {
	cursor: pointer !important;
	justify-content: space-between;
	display: flex;
	align-items: center;
}

#setting_popup input {
	margin-left: 12px;
}

.popup_element {
	position: absolute;
	top: 100px;
	left: 125px;
	width: 400px;
	height: 300px;
	z-index: 500;
}

.popup_element_style {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	position: relative;
	background: #e5e9ed;
	border-radius: 12px;
	box-shadow: 0 3px 14px rgba(0,0,0,0.8);
	overflow: hidden;
}

.draggable_handle {
	font-size: 14px;
	padding-left: 7.5px;
	box-sizing: border-box;
	display: flex;
	align-items: end;
	color: #000;
	text-shadow: 0 0 10px #fffc;
}

.popup_close {
	width: 20px;
	height: 20px;
	position: absolute;
	top: 0;
	right: 0;
	background-color: red;
	cursor: pointer !important;
	color: white;
	font-family: sans-serif;
	font-size: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.popup_content {
	padding: 10px 20px;
	display: flex;
	flex-direction: column;
	height: calc(100% - 20px);
	box-sizing: border-box;
	overflow: scroll;
	border-bottom: 10px solid #e5e9ed;
}

.popup_loading {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	background: url("../img/logo-loading.svg") no-repeat center;
	background-size: 75% auto !important;
	overflow: hidden;
	cursor: wait;
}

.popup_content p {
	margin-top: 0;
	margin-bottom: 15px;
}

.popup_content > p {
	margin-top: 5px !important;
}

.popup_title {
	margin-bottom: 15px;
	padding: 7.5px 2.5px;
	position: relative;
	cursor: pointer !important;
	background: #c5c9df;
	border-radius: 6px;
	box-shadow: 2px 2px 4px -2px #000;
	overflow: hidden;
}

.popup_title * {
	cursor: pointer !important;
}

.popup_title > p {
	margin-bottom: 0;
	font-weight: 700;
	white-space: nowrap;
}

.popup_sublist {
	padding: 5px;
	margin-left: 30px;
	margin-bottom: 30px;
	background: #d5d9df;
	border-radius: 6px;
	box-shadow: 2px 2px 4px -2px #000;
}

.popup_attributes {
	padding: 3px;
	padding-right: 10px;
	display: grid;
	height: 100%;
	position: absolute;
	top: 0;
	right: 0;
	box-sizing: border-box;
	grid-gap: 20px;
	background: #c5c9df;
	border-radius: 6px;
}

.popup_attributes::before {
	height: 100%;
	width: 30px;
	content: "";
	position: absolute;
	top: 0;
	left: -30px;
	background: linear-gradient(to right, #c5c9df00 0%, #c5c9df 80%, #c5c9df 100%);
}

.popup_attributes tag {
	grid-row: 1;
	background-size: auto 100%;
	background-repeat: no-repeat;
	height: calc(33px - 5px);
	width: calc(33px - 5px);
}

.attributes_detour {
	background: url("../img/warning.svg");
}

.attributes_oneWay {
	background: url("../img/one-way.svg");
}

.attributes_expired {
	background: url("../img/expired.svg");
}

.popup_sublist p {
	margin-bottom: 10px;
}

.popup_sublist p:last-child {
	margin-bottom: 0;
}

.popup_table {
	padding: 4px 10px;
	background: #d5d9df;
	border-radius: 8px;
	border-spacing: 0 8px;
}

.popup_table * {
	white-space: nowrap;
}

.popup_table tr {
	height: 100%;
	position: relative;
	overflow: hidden;
}

.popup_table tr:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	border: 1px solid black;
	box-sizing: border-box;
	border-radius: 4px;
}

.popup_table td, .popup_table th {
	padding: 2.5px 5px 2.5px 10px;
	height: 100%;
	border-right: 1px solid black;
	border-radius: 4px;
	position: relative; /* Zfunkčňuje z-index */
	z-index: 1; /* Umožňuje označit obsah buňky */
	overflow: hidden;
}

.popup_table th {
	font-weight: 700 !important;
}

.table_button {
	padding: 1px 0 !important;
    font-size: 12px;
}

.table_button button {
	margin: 0 !important;
}

.popup_buttons {
	padding: 10px 10px;
	margin: 5px 0;
	background: #fff;
	border: 1px solid #d5d9df;
	border-radius: 6px;
	font-size: 16px;
}

.popup_buttons:hover {
    background: #c5cbd9;
}

.popup_buttons:active, .table_button .popup_buttons:focus-visible {
    background: #172f67;
    color: white;
}

.popup_buttons:disabled, .popup_buttons[disabled] {
	background: #e5e9ed;
	color: #717171;
	pointer: not-allowed;
}

.table_button .popup_buttons {
	width: 100%;
	height: 100%;
	border: none;
	font-size: 12px;
	border-radius: 0;
}

.draggable_handle {
	height: 20px;
	width: 100%;
	background-color: #a5a9ad;
	cursor: pointer !important;
}

#popup_trip_stations .table_column_time, #popup_trip_stations .table_column_lenght {
	text-align: right;
}

#popup_changer {
	display: none;
}

/* Nastavení na mobil */
.mobile .popup_element {
	width: 100vw !important;
	height: 40dvh !important;
	left: 0 !important;
	top: 60dvh !important;
}

.mobile .popup_element_style {
	border-radius: 6px 6px 0 0;
	box-shadow: none;
}

.mobile .popup_content {
	height: 100%;
}

.mobile .popup_close {
	top: 5px;
	right: 5px;
	border-radius: 4px;
}

.mobile .popup_element .draggable_handle {
	display: none;
}

.mobile #popup_changer {
	position: absolute;
	left: 0;
	bottom: 40dvh;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-evenly;
	z-index: 250;
}

.mobile #popup_changer::after {
	content: "";
	width: 100%;
	height: 10px;
	position: absolute;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.5);
	filter: blur(10px);
	transform: translateY(50%);
}

.mobile .popup_changer_button {
	padding: 8px 16px;
	background: #e5e9ed;
	display: inline-block;
	flex-grow: 1;
	box-shadow: inset 2px 2px 2px rgba(0,0,0,0.2);
	border-radius: 6px 6px 0 0;
	cursor: pointer !important;
}

.bold {
	font-weight: 700;
}

.valid {
	color: #006a30;
}

.invalid {
	color: #ae2010;
}

.warning {
	color: #b97800;
}

.waiting * {
	cursor: wait;
}

.waiting #map * {
	cursor: wait !important;
}

.movein * {
	cursor: move !important;
}

.invisible {
	display: none !important;
}

.onTop {
	z-index: 10000 !important;
}