/* micro-5-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Micro 5';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/micro-5-v1-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: '04b03rev';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/04b03rev.ttf.woff') format('woff'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

body {
  font-family: '04b03rev';
  font-size: 16px;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body * {
  image-rendering: pixelated;
  cursor: default;
}
a {
  cursor: default;
  color: currentColor;
  text-decoration: none;
}

h1,h2,h3,h4,h5,h6 {
  font-family:'Micro 5';
}



.header {
  position: fixed;
  padding: 0 8px;
  z-index: 2;
}
.header h1{
  font-size: 32px;
  margin: 0;
  line-height: 1;
  color: #806e49;
  text-shadow: 0px 3px 0 #af8f61;
}

main[viewmode="townView"] .sidebar-right {
  display: none;
}

.sidebar-right {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 5px 0;
  z-index: 1003;
  right: 10px;
  top: 10px;
}
.sidebar-right button {
  border: 2px solid;
  background: transparent;
  min-width: 50px;
/*  font-size: 14px;*/
  transition: all .2s ease-in-out;
}
.sidebar-right button.active, .sidebar-right button:hover {
  border: 2px solid #fff;
  background: #fff;
}


.footer {
  position: fixed;
  bottom: 8px;
  display: flex;
  /* align-content: center; */
  justify-content: center;
  /* flex-wrap: wrap; */
  width: 100%;
  z-index: 1;
}
span.info {
/*  font-size: 22px;*/
  color: #000;
/*  text-shadow: 0px 1px 0 #fff;*/
}




.map_wrapper {
  width: 100vw;
  height: 100vh;
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  overflow: hidden;
}
.map_layers
{
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  transform: scale(1.0);
  transform-origin: left top;
}
canvas#map-canvas {
  background: transparent;
  position: absolute;
  z-index: 1;
}
canvas#map-gfx-1 {
  position: absolute;
  background: #baab80;
  background: url('/assets/img/water_bg.png') repeat 0 0;
  z-index: 2;
}
canvas#map-gfx-2 {
  position: absolute;
  background: transparent;
  z-index: 3;
  opacity: 0.5;
}
.map_overlay {
  position: absolute;
  opacity: 0.0;
  transition: opacity .3s ease-in-out;
}
.map_overlay.visible {
  opacity: 0.7;
}


canvas#map-political-view {
    background: transparent;
    z-index: 19;
}
canvas#map-political-view.visible {
    opacity: 0.1;
}
canvas#map-overlay-1 {
  background: transparent;
  z-index: 100;
}
canvas#map-overlay-2 {
  background: transparent;
  z-index: 101;
}
canvas#map-overlay-3 {
  background: transparent;
  z-index: 102;
}
#map_roads {
  position: absolute;
  z-index: 20;
}
#map_terrain {
  position: absolute;
  z-index: 30;
}

#map_towns {
  position: absolute;
  z-index: 40;
}


.ship_layer {
  z-index: 100;
}
#map_frame {
  position: absolute;
  width: 100vW;
  height: 100vH;
  z-index: 1000;
}
main .frame {
  position: fixed;
  opacity: .8;
  mix-blend-mode: exclusion;
}
#UI_layer {
  position: absolute;
  width: 100vW;
  height: 100vH;
  z-index: 1000;
}
#map_frame.showMoveInCursor {
  cursor: all-scroll;
}
#map_frame.showZoomInCursor {
  cursor: zoom-in;
}
#map_frame.showNoCursor {
  cursor: not-allowed;
}

.town_info {
  position: absolute;
  left: 200px;
  top:200px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .3s ease-in-out;
}
#UI_layer[currentzoom="2"] .town_info
{
  transform: scale(0.5);
}
#UI_layer[currentzoom="4"] .town_info, #UI_layer[currentzoom="0.5"] .town_info
{
  display: none;
}
.town_info.active {
  opacity: 1;
}
.town_name {
  display: flex;
}
.label_start {
  width: 64px;
  height: 64px;
  background: url('/assets/img/lable64_left_end.png') no-repeat 0 0;
}
.label_content {
  width: fit-content;
  height: 64px;
  padding: 0;
  background: url('/assets/img/lable64_bg.png') repeat-x 0 10px;
}
.label_content span {
    line-height: 48px;
    font-family: 'Micro 5';
    color: #453a24;
    font-size: 32px;
    margin: 0px -24px 0px;
    z-index: 1;
    position: relative;
}
.label_end {
  width: 64px;
  height: 64px;
  background: url('/assets/img/lable64_right_end.png') no-repeat 0 0;
}

.page {
  position: absolute;
  z-index: 1001;
  bottom: -100vw;
  transition: bottom 0.5s ease-in-out;
  margin-bottom: -70px;
  right: 0;
  width: 100vw;
  height: 100vw;
  display: flex;
  justify-content: center;
  background: url(/assets/ui_img/paper_horizontal.png) no-repeat center top;
  background-size: contain;
  min-width: 1000px;
}
.page.visible {
  bottom: 0;
}
.page .close_btn
{
  font-size: 48px;
  position: absolute;
  right: calc(50% - 460px);
  z-index: 1;
  cursor: pointer;
  color: #453a24;
}
.page .close_btn:hover {
  color: #b88452;
}

#town_detail {
    height: 50vh;
    display: flex;
    justify-content: center;
}
#town_detail .town_name {
  transform: scale(2.1);
  transform-origin: top;
}
#town_detail .town_data {
  position: absolute;
  left: calc(50% - 400px);
  top: 15vh;
}
#loading_screen {
  position: fixed;
  z-index: 1000000;
  width: 100vW;
  height: 100vH;
  background: #baab80;
  display: block;
  opacity: 0;
  transition: all .5s ease-in-out;
}
#loading_screen > div {
  height: 80%;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#loading_screen.active{
  opacity: 1;
}

#loading_screen h1 {
  font-size: 32px;
  margin: 0 0 10px;
  line-height: 1;
  color: #806e49;
  text-shadow: 0px 3px 0 #af8f61;
}
#loading_screen p {
  margin: 0 0 5px;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
 }
#loading_screen p.fadedOut {
  opacity: 0;
 }
#loading_screen .start_btn {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  transition-delay: 0.3s;
  padding: 4px 12px;
  border: 2px solid;
  width: fit-content;
  display: block;
  cursor: pointer;
 }
 #loading_screen .start_btn:hover {
  background: #ffffff36;
 }
#loading_screen .start_btn.fadedOut {
  opacity: 0;
 }

#menu_screen {
  position: fixed;
  z-index: 1000000;
  width: 100vW;
  height: 100vH;
  background: #baab80;
  display: block;
  opacity: 0;
  transition: all .5s ease-in-out;
}
#menu_screen > div {
  height: 80%;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
#menu_screen.active{
  opacity: 1;
}
#menu_screen h1 {
  font-size: 64px;
  margin: 0 0 10px;
  line-height: 1;
  color: #806e49;
  text-shadow: 0px 3px 0 #af8f61;
}
#menu_screen p {
  margin: 0 0 5px;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
 }
#menu_screen .btn {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  transition-delay: 0.3s;
  padding: 4px 12px;
  border: 2px solid;
  width: fit-content;
  display: block;
  cursor: pointer;
 }
 #menu_screen .btn:hover {
  background: #ffffff36;
 }



/*show Map */

body:has(#map_frame.showMoveInCursor) {
  background: #f90;
}



/*NEW GAME*/

form#creategame {
    display: flex;
    flex-direction: column;
}
form#creategame input {
    overflow: visible;
    background: #ffffff63;
    margin-bottom: 10px;
    text-align: center;
}
form#creategame input[type="submit"] {
    background: #fff;
    padding: 10px;
    margin-bottom: 20px;
}