@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400&subset=latin-ext');
@import url('https://fonts.googleapis.com/css2?family=Inria+Sans');

html, body {
  height: 100%;
  margin: 0;
	background: #111;
}
body {
	font-family: "Source Sans Pro", sans-serif;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	touch-action: none;
}
body, p, ul, li {
	-webkit-text-size-adjust:none;
	font-size: 16px;
}
p, ul, li {
	line-height: 20px;
}
h1, h2, h3 {
	font-family: "Inria Sans", sans-serif;
	font-size: 36px;
	font-weight: 400;
	line-height: 45px;
}
h1, h2, h3, p {
	padding: 0;
	margin: 0 0 20px 0;
}
img {
	border: 0;
}

#loader,
#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: black;
  color: white;
  padding: 20px;
  text-align: center;
  z-index: 100;
}

#start {
	color: #fff;
	position:absolute;
	text-align:center;
	width: 100%;
	height: 100%;
	padding: 60px;
	box-sizing: border-box;
	background: black url(img/preload.jpg);
}
#start-button {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: none;
  transition: opacity 0.5s;
	font-size: 20px;
	/*animation: pulseButton 1s ease-in-out infinite;*/
	background-color: #E51215;
	padding: 10px 20px;
}
@keyframes pulseButton {
  0%, 100% {
		background-color: #222F5B;
  }
  50% {
    background-color: #29396D;
  }
}
#start-button:hover {
  animation: none;
}
#start-button.show {
  display: block;
}
#sanitka {
	width: 109px;
	height: 94px;
	margin: 90px auto 0;
	background: url(img/logo-sanitka2.svg) no-repeat center center / contain;
}

.button {
	font-family: "Inria Sans", sans-serif;
	line-height:1;
	font-weight: 400;
  font-size: 16px;
  padding: 10px 15px;
  background-color: #222F5B;
	text-align: center;
  color: white;
  border-style: solid;
  border-color: black;
  border-width: 0 0 2px 0;
  border-radius: 4px;
  cursor: pointer;
	transition: background-color 0.25s ease;
}
.button:hover {
	background-color: #29396D;
}

h1 {
  color: #fff;
  position: relative;
  width: 266px;
  height: 45px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  color: transparent;
}
h1:before {
  content: "";
  display: block;
  width: 186px;
  height: 90px;
  position: absolute;
  left: 0;
  top: 9px;
  background: url(img/logo-zachran-zivot.svg) no-repeat left top / auto 70px;
}
h1:after {
  content: "";
  display: block;
  width: 186px;
  height: 90px;
  position: absolute;
  right: -40px;
  bottom: 8px;
  background: url(img/logo-zachran-zivot.svg) no-repeat right bottom / auto 70px;
}

#game_container {
	position: absolute;
}

#container {
  width: 960px;
  height: 540px;
  position: absolute;
	/*
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
	*/
	transform-origin: 0 0;
  box-sizing: border-box;
  background: #000;
  overflow: hidden;  /* schová přetečení */
}

#intro {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
#intro.preload {
	height:0;
	display:block;
	overflow: hidden;
}
#background-video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

#menu {
  position: absolute;
  left: 0;
  top: 160px;
  white-space: nowrap;
  height: 170px;
  box-sizing: border-box;
  padding: 10px 0;
  padding: 0 40px;
}

.menu-circle {
  position: relative;  /* pro absolutní pozicování ::before */
  display: inline-block;
  margin: 0 20px;
  border-radius: 50%;
}

.menu-circle::before,
.menu-circle::after {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;  /* tlačítko 170 + 2*10 */
  bottom: 0px;
  border-radius: 50%;
  background-color: #fff;
  pointer-events: none;
  z-index: -1; /* pod tlačítkem */
  animation: pulse 3s infinite linear;
}
.menu-circle::after {
	animation-delay: 1.5s;
}

.story-button {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: solid 10px #2C4871;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  color: white;
  position: relative;
  display: block;
	padding:0;
	transition: border-color 0.25s ease;
}
.story-button:hover {
	border: solid 10px #A4B6D5;
}
.story-button .label {
	position: absolute;
	bottom: -54px;
	font-family: "Inria Sans", sans-serif;
	font-weight: 400;
	font-size: 24px;
	left: 0;
	width: 100%;
	text-align: center;
	opacity: 0;
	transition: opacity 2s ease;
	text-shadow: 0 0 3px black;
}
.story-button:hover .label {
	transition: opacity 0.25s ease;
	opacity: 1;
}
.touch_device .story-button .label {
	opacity: 1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

#player {
	position: relative;
	max-width: 960px;
}
video {
}

#fade-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 10;
  display: none;
}
#fade-overlay.black {
	transition: opacity 1s ease;
	background: black;
}

#choices {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.choice-button {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
	background: transparent;
  color: rgba(255,255,255,0);
	text-transform: uppercase;
  border: 10px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  font-size: 16px;
  text-align: center;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
  animation: growBounce 0.5s ease-out forwards;
	pointer-events: auto;
	box-sizing: content-box;
	background-clip: padding-box;
	transition: background-color 0.333s ease, color 0.333s ease
}
.choice-button:hover {
	background-color: #09254D;
	color: rgba(255,255,255,255);
}
.touch_device .choice-button {
	background-color: #09254D;
	color: rgba(255,255,255,255);
}

@keyframes growBounce {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  100% {
    width: 100px;
    height: 100px;
    opacity: 1;
  }
}
.choice-button.pulseLoop {
  width: 100px;
  height: 100px;
	animation: pulseLoop 1.2s ease-in-out infinite;
}
@keyframes pulseLoop {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.backToMenu {
	position:absolute;
	z-index:9;
	left:10px;
	top:10px;
	font-family: "Inria Sans", sans-serif;
	font-size: 12px;
	font-weight: 400;
	cursor: pointer;
	border: none;
	background: url(img/back.svg);
	background-size: 22px 22px;
	background-position: left center;
	background-repeat: no-repeat;
	line-height: 1;
  padding: 5px 7px 5px 27px;
	text-shadow: 0 0px 5px black;
	color: white;
	border-radius: 4px;
	transition: background-color 0.25s ease, opacity 0.25s ease;
	opacity:0.5;
}
.backToMenu:hover {
	background-color: #222f5b;
	opacity:1;
}

.hidden {
	display: none;
}
#timeout-message, #success-message {
	position: absolute;
	z-index: 98;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: black url(img/bg.jpg);
	text-align:center;
	color: white;
  transition: opacity 0.5s ease;
	opacity: 1;
}
.message {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width:513px;
	height:222px;
	background-image: url(img/rec.svg);
	background-repeat: no-repeat;
	background-position: center center;
	padding: 40px 0;
  box-sizing: border-box;
}

#choice-progress {
  position: absolute;
  bottom: 25px;
  left: 180px;
  width: 600px;
  height: 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
	opacity: 0.8;
	animation: pulseOpacity 1s ease-in-out infinite;
}

#choice-progress-fill {
  width: 100%;
  height: 100%;
  background-color: #4caf50;
  border-radius: 0px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 10s linear, background-color 10s linear;
}

@keyframes pulseOpacity {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#howto-button {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}

#howto {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8) url(img/bg.jpg);
  color: white;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 60px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#howto.show {
  opacity: 1;
  pointer-events: all;
}

.howto-content {
  padding: 30px;
  border-radius: 12px;
	text-align: center;
}
ul.howto-list {
  list-style: none;
  padding: 0;
}
ul.howto-list li {
  position: relative;
  margin-bottom: 10px;
}
.howto-content p,
.howto-content li {
	text-align: left;
	padding: 2px 40px;
	line-height: 20px;
}
ul.howto-list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background-image: url("img/icons.svg");
  background-repeat: no-repeat;
  background-size: cover;
}
li.icon-play::before {
  background-position: 0px 0px;
}

li.icon-click::before {
  background-position: 0px -42px;
}

li.icon-time::before {
  background-position: 0px -117px;
}

li.icon-heart::before {
  background-position: 0px -175px;
}

#back-to-menu {
  margin-top: 20px;
	margin: 0 auto;
}

#branding {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 137px;
  color: white;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
  z-index: 10;
}

.logo-left-1 {
  float: left;
	width: 114px;
	height: 97px;
	margin: 10px;
}
.logo-spacer {
  float: left;
	display:block;
	width: 1px;
	height: 97px;
	background: rgba(255,255,255,0.25);
	margin: 10px;
	box-shadow: 0 0 5px rgba(255, 255, 255, 0.333);
}
.logo-left-2 {
  float: left;
	width: 93px;
	height: 45px;
	margin: 36px 10px 46px;
}
.logo-right-1 {
  float: right;
	width: 160px;
	height: 23px;
	margin: 57px 20px 57px 10px;
}
.logo-right-2 {
  float: right;
	width: 60px;
	height: 75px;
	margin: 31px 10px 31px 20px;
}

#branding p {
  margin: 0;
  font-size: 14px;
  text-align: center;
  flex: 1;
}

#fade-cover {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  pointer-events: none;
  z-index: 99;
  transition: opacity 0.5s ease;
}
#fade-cover.visible {
  opacity: 1;
  pointer-events: auto;
}
#fade-cover.red {
  background-color: #E51215;
}

#ovladani_obrazovka {
	position: absolute;
	z-index:200;
	right: 10px;
	top: 10px;
	width: 22px;
	height: 22px;
	background: none;
	background-size: 20px 20px;
	background-repeat: no-repeat;
	background-position: center;
	border: none;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.25s ease;
	background-color: #222f5b;
	border-radius: 4px;
}
#ovladani_obrazovka:hover {
	opacity: 1;
}
#ovladani_obrazovka.state_0 {
	background-image:url(img/state_0.svg);
}
#ovladani_obrazovka.state_1 {
	background-image:url(img/state_1.svg);
}
#ovladani_obrazovka.state_2 {
	background-image:url(img/state_2.svg);
}
