/* Space Grotesk (SIL OFL, self-hostovaný) pro nadpisy a nápis v hlavičce */
@font-face {
	font-family: "Space Grotesk";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/space-grotesk-700-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Space Grotesk";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/space-grotesk-700-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

h1, h2, h3 {
	font-family: "Space Grotesk", "DejaVu Sans", "Lucida Sans", sans-serif;
	font-weight: 700;
}

body {
	display: flex;
	flex-direction: column;
	background-color: white;
	color: black;
	margin: 0;
	min-height: 100vh;
}

@media (max-width: 767px) {
    .container {
        width: 100%; /* needed because body is flex */
    }
}

.flavor-test {
	background-color: sandybrown;
}

.flavor-devel {
	background-color: violet;
}

/* hlavičku (logo + hlavní menu webu FO) stylují fo-header.css + _fo_header.html,
 * obojí stažené z webu FO přes make update-fo-header */
header {
    margin-bottom: 15px;
}

/* přihlášený uživatel: kompaktní hlavička bez hlavního menu webu FO */
header.prihlasen #main-nav {display: none}
header.prihlasen #menu-tlacitko {display: none}
header.prihlasen #logo {width: 100%}
header.prihlasen #logo img {width: 84px; margin-left: 14px}
header.prihlasen #logo a > span {display: inline-block; font-size: 40px; line-height: 84px; vertical-align: top}
header.prihlasen #logo .rocnik {display: inline-block; margin-left: 20px; font-size: 20px; line-height: 84px; vertical-align: top}
header.prihlasen #logo .osmo-badge a {font-size: 40px}
header.prihlasen #logo .osmo-badge b {font-size: 40px}
@media (max-width: 991px) {
	header.prihlasen #logo img {width: 64px}
	header.prihlasen #logo a > span {font-size: 28px; line-height: 40px; padding-top: 8px}
	header.prihlasen #logo .rocnik {display: block; margin-left: 0; font-size: 17px; line-height: 40px}
	header.prihlasen #logo .osmo-badge a,
	header.prihlasen #logo .osmo-badge b {font-size: 28px}
}
@media (max-width: 767px) {
	header.prihlasen #logo img {width: 56px; margin-left: 10px}
	header.prihlasen #logo a > span {font-size: 24px; line-height: 34px; padding-top: 10px}
	header.prihlasen #logo .rocnik {display: block; margin-left: 0; font-size: 15px; line-height: 34px}
	header.prihlasen #logo .osmo-badge a,
	header.prihlasen #logo .osmo-badge b {font-size: 24px}
}
@media (max-width: 420px) {
	header.prihlasen #logo img {width: 48px}
	header.prihlasen #logo a > span {font-size: 20px; line-height: 30px}
	header.prihlasen #logo .rocnik {line-height: 30px}
	header.prihlasen #logo .osmo-badge a,
	header.prihlasen #logo .osmo-badge b {font-size: 20px}
}

nav {
    position: sticky !important;
    top: 0;
    z-index: 1020;
}

/* tlačítka přihlášení a odhlášení jako na webu FO (.btn-fo) */
.navbar-default .navbar-nav > li.prihlaseni > a,
.navbar-default .navbar-form button.odhlaseni {
	font-family: "Space Grotesk", "DejaVu Sans", "Lucida Sans", sans-serif;
	margin: 10px 8px;
	padding: 5px 12px;
	line-height: 20px;
	background: #4a5865;
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-weight: bold;
	font-size: 14px;
	white-space: nowrap;
}
.navbar-default .navbar-nav > li.prihlaseni > a:hover,
.navbar-default .navbar-nav > li.prihlaseni > a:focus,
.navbar-default .navbar-form button.odhlaseni:hover,
.navbar-default .navbar-form button.odhlaseni:focus {
	background: #37424d;
	color: #fff;
	text-decoration: none;
}
/* formulář odhlášení přidává vlastní margin 7 px — dorovnání na 50px lišty */
.navbar-default .navbar-form button.odhlaseni {margin: 3px 0 3px 8px}

footer {
	margin-top: auto;
	margin-bottom: 11px;
}

.error {
	color: red;
	font-weight: bold;
}

.okay {
	color: green;
	font-weight: bold;
}

.hint {
	color: #737373;
}

.joiner + .joiner::before {
    content: ", ";
}

span.unknown {
	font-weight: bold;
	color: red;
}

h2 {
    font-size: 32px;
    margin-top: 0px;
}

p > .btn, .panel-body > .btn {
    margin-top: 5px;
    margin-bottom: 5px;
}

td > .btn-xs:nth-last-child(5),
td > .btn-xs:nth-last-child(4),
td > .btn-xs:nth-last-child(3),
td > .btn-xs:nth-last-child(2),
td > .btn-xs:nth-last-child(2) ~ .btn-xs {
    margin-top: 2px;
}

th > .btn-xs {
    float: right;
    margin-top: -2px;
}

table.table-auto {
    width: auto;
}

#diplomy td:not(:first-child),
#diplomy th:not(:first-child) {
    width: 1%;
    white-space: nowrap;
}

table.table thead, table.table tfoot {
	background-color: #ddd;
}

td ul {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
}

td.comment {
    font-size: 0.9em;
    max-width: 15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popover {
    max-width: 360px;
    white-space: pre-line;
}

table tr.state-disqualified, table tr.state-disqualified a:not(.btn) {
	color: darkred;
}
table tr.state-absent, table tr.state-absent a:not(.btn) {
	color: #888;
}
table tr.state-refused, table tr.state-refused a:not(.btn) {
	color: #888;
}


.form-group.required .control-label:after {
	content:"*";
	color:red;
}

.form-frame {
	padding: 10px;
	border: 1px #ddd solid;
	border-radius: 4px 4px;
	margin-bottom: 22px;
}

.form-horiz-frame {
	/* As .form-frame, but for groups of control in Bootstrap's horizontal forms */
	padding: 10px;
	border: 1px #ddd solid;
	border-radius: 4px 4px;
	overflow-x: clip;	/* Bootstrap's .form-group has negative margins */
}

.form-null-frame {
	/* Shrinks width the same as .form-(horiz-)frame does */
	padding-left: 11px;
	padding-right: 11px;
}

.form-horiz-frame .form-group:last-child {
	margin-bottom: 0;
}

.collapsible + .form-null-frame {
	margin-top: 15px;
}

.collapsible + .btn-group {
	margin-top: 15px;
}

select.no-scroll::-webkit-scrollbar {
	display: none;
}

.checked_toggle input.toggle:checked ~ .checked_hide {
	display: none;
}
.checked_toggle input.toggle:not(:checked) ~ .checked_show {
	display: none;
}

/* Users */

.user-test {
	color: green;
}
.user-inactive {
	color: red;
}

/* Tabs - source: https://codepen.io/MPDoctor/pen/mpJdYe */
.tabbed {
	margin: 15px 0px;
}

.tabbed [type="radio"] {
	/* hiding the inputs */
	display: none;
}

.tabs {
	display: flex;
	align-items: stretch;
	list-style: none;
	padding: 0;
	margin-bottom: 0px;
	margin-right: 3px;
	border-bottom: 1px solid #ddd;
}
.tab > label {
	display: block;
	margin-right: 2px;
	margin-bottom: -1px;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px 4px 0px 0px;
	background: #eee;
	color: #666;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s;
}
.tab:hover label {
	background: #ddd;
	color: #333;
}

.tab-content {
	display: none;
	margin: 0px;
	margin-top: -1px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 0 4px 4px 4px;
	border-top: 0px;
}

/* As we cannot replace the numbers with variables or calls to element properties, the number of this selector parts is our tab count limit */
.tabbed [type="radio"]:nth-of-type(1):checked ~ .tabs .tab:nth-of-type(1) label,
.tabbed [type="radio"]:nth-of-type(2):checked ~ .tabs .tab:nth-of-type(2) label,
.tabbed [type="radio"]:nth-of-type(3):checked ~ .tabs .tab:nth-of-type(3) label,
.tabbed [type="radio"]:nth-of-type(4):checked ~ .tabs .tab:nth-of-type(4) label,
.tabbed [type="radio"]:nth-of-type(5):checked ~ .tabs .tab:nth-of-type(5) label {
	border-bottom-color: #fff;
	background: #fff;
	color: #222;
}

.tabbed [type="radio"]:nth-of-type(1):checked ~ .tab-content:nth-of-type(1),
.tabbed [type="radio"]:nth-of-type(2):checked ~ .tab-content:nth-of-type(2),
.tabbed [type="radio"]:nth-of-type(3):checked ~ .tab-content:nth-of-type(3),
.tabbed [type="radio"]:nth-of-type(4):checked ~ .tab-content:nth-of-type(4) {
	display: block;
}

/* Icons */

@font-face {
	font-family: 'icomoon';
	src: url('fonts/icomoon.ttf?azc5ov') format('truetype'),
	     url('fonts/icomoon.woff?azc5ov') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

.icon {
	/* Use !important to prevent issues with browser extensions that change fonts */
	font-family: 'icomoon' !important;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;

	/* Better font rendering */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.pdf-icon {
    display: inline-block;
    border: 1px solid transparent;
}
.pdf-icon:hover, .pdf-icon:focus {
    text-decoration: none;
    border: 1px solid #337ab7;
}

/* Collapsible */

.collapsible {
	position: relative;
}
.collapsible input[type="checkbox"].toggle {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
}
.collapsible label.toggle {
	cursor: pointer;
	margin-left: 15px;
}
.collapsible label.toggle-small {
	font-weight: normal;
	margin-bottom: 0px;
}
.collapsible label.toggle::before {
	position: absolute;
	content: "";
	width: 0;
	height: 0;
	left: 0px;
	border-left: 8px solid black;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	transition: 0.5s ease;
}
.collapsible input[type="checkbox"].toggle:checked ~ label.toggle::before {
	transform: rotate(90deg);
}
.collapsible .collapsible-inner {
	max-height: 0;
	overflow-y: hidden;
	transition: 0.5s ease;
}
.collapsible input[type="checkbox"].toggle:checked ~ .collapsible-inner {
	max-height: 100vh;
}

div.message {
	padding: 5px 10px;
	margin-bottom: 5px;
	border-radius: 5px;
	border: solid 1px #f8d99b;
	color:#46381f;
	background-color:#fff8d5;
}
div.message.new {
	background-color: #ffdede;
	border: solid 1px #ff5e5e;
}
div.message .msg-title {
	font-weight: bold;
}
div.message .msg-date {
	float: right;
	font-style: italic;
	color: #777;
}

/* Input classes */

input.modified {
	background-color: rgb(255, 222, 152);
	border-color: orange;
}

/* Public rounds grid (/public/) */

.public-rounds-table tbody th {
	white-space: nowrap;
}
.public-rounds-table .cat-label {
	display: inline;
}
@media (max-width: 575px) {
	.public-rounds-table .round-date {
		font-size: 0.75em;
	}
	.public-rounds-table .cat-label {
		display: none;
	}
}
