:root {
    --background-color: #FFF;
    --text-color: #555;
    --link-color: #2A8CB7;
    --link--visited-color: #8F00F5;
}

html[data-theme='light'] {
    --background-color: #FFF;
    --text-color: #555;
    --text-hover-color: #646464;
    --link-color: #2A8CB7;
    --link--visited-color: #8F00F5;
   
}

html[data-theme='dark'] {
    --background-color: #1C1B22;
    --text-color: #F7F8F8;
    --text-hover-color: rgb(194, 194, 194);
    --link-color: #69BADD;
    --link--visited-color: #BB5CFF;
}

#theme-toggle {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5em;
    padding: 6px;
    border: none;
    background-color: transparent;
    z-index: 10;

}

[data-theme='light'] #theme-toggle {
    filter: contrast(70%) brightness(120%) opacity(40%);
}

[data-theme='dark'] #theme-toggle {
    filter: contrast(70%) brightness(130%) opacity(40%);
}

[data-theme='light'] #theme-toggle:hover {
    filter: none;
    cursor: pointer;
}

[data-theme='light'] #theme-toggle:active {
    font-size: 1.45em;
}

[data-theme='dark'] #theme-toggle:hover {
    filter: none;
    cursor: pointer;
}

[data-theme='dark'] #theme-toggle:active {
    font-size: 1.45em;
}

[data-theme='light'] #theme-toggle::after {
    content: "\1F31E";
}

[data-theme='dark'] #theme-toggle::after {
    content: "\1F319";
}
body {
    margin: 0 auto;
    max-width: 50em;
    line-height: 1.5;
    padding: 4em 1em;
    color: var(--text-color);
    background: var(--background-color);
    font-family: "Helvetica", "Arial", sans-serif;
}

h2 {
    margin-top: 1em;
    padding-top: 1em;
}

label {
    padding-left: 10px;
}

a {
    color: var(--link-color);
}

a:visited {
    color: var(--link--visited-color);
}
:root {
    --background-color: #FFF;
    --text-color: #555;
    --link-color: #2A8CB7;
    --link--visited-color: #8F00F5;
}

html[data-theme='light'] {
    --background-color: #FFF;
    --text-color: #555;
    --text-hover-color: #646464;
    --link-color: #2A8CB7;
    --link--visited-color: #8F00F5;
   
}

html[data-theme='dark'] {
    --background-color: #1C1B22;
    --text-color: #F7F8F8;
    --text-hover-color: rgb(194, 194, 194);
    --link-color: #69BADD;
    --link--visited-color: #BB5CFF;
}

#theme-toggle {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5em;
    padding: 6px;
    border: none;
    background-color: transparent;
    z-index: 10;

}

[data-theme='light'] #theme-toggle {
    filter: contrast(70%) brightness(120%) opacity(40%);
}

[data-theme='dark'] #theme-toggle {
    filter: contrast(70%) brightness(130%) opacity(40%);
}

[data-theme='light'] #theme-toggle:hover {
    filter: none;
    cursor: pointer;
}

[data-theme='light'] #theme-toggle:active {
    font-size: 1.45em;
}

[data-theme='dark'] #theme-toggle:hover {
    filter: none;
    cursor: pointer;
}

[data-theme='dark'] #theme-toggle:active {
    font-size: 1.45em;
}

[data-theme='light'] #theme-toggle::after {
    content: "\1F31E";
}

[data-theme='dark'] #theme-toggle::after {
    content: "\1F319";
}
body {
    margin: 0 auto;
    max-width: 50em;
    line-height: 1.5;
    padding: 4em 1em;
    color: var(--text-color);
    background: var(--background-color);
    font-family: "Helvetica", "Arial", sans-serif;
}

h2 {
    margin-top: 1em;
    padding-top: 1em;
}

label {
    padding-left: 10px;
}

a {
    color: var(--link-color);
}

a:visited {
    color: var(--link--visited-color);
}
.main-menu-button {
  background-color: unset;
  border: none;
  cursor: pointer;
}

.main-menu {
  position: relative;
  display: inline-block;
}

h1 {
    color: var(--text-color);
    font-family: "Helvetica", "Arial", sans-serif;
}

h1:hover {
    color: var(--text-hover-color);
}
.main-menu-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.main-menu-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.main-menu-content a:hover {background-color: #f1f1f1}

.main-menu:hover .main-menu-content {
  display: block;
}

:root {
  --slot-size: 6.5rem;
  --slot-flag-section: 3rem;
  --slot-country-section: 1.75rem;
  --slot-capital-section: 1.75rem;
  --flag-width: 5rem;
  --flag-height: 3.75rem;
  --slot-capital-offset: var(--slot-flag-section);
  --slot-country-offset: calc(var(--slot-flag-section) + var(--slot-country-section));
}


html[data-theme='light'] {
  --capital-color: #413055;
  --country-color: #295860;
 
}

html[data-theme='dark'] {
  --capital-color: #DDC3D0;
  --country-color: #DBFCFF;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  width: 100%;
  max-width: none;
  overflow: hidden;
  touch-action: none;
}

* {
  box-sizing: border-box;
}

.container, #root, #root>div {
 height: 100%;
 min-width: 200px;
 min-height: 200px;
}
/* Avoid highlight selection*/
div {
  -webkit-touch-callout:none;
  -webkit-user-select: none;
  user-select:none;
}

.container {
  display: flex;
  /* flex-direction: column;
  align-items: center; */
  justify-content: center;
}

.container .slot-area {
  height: auto;
  min-height: 80%;
  padding-left: 2em;
  padding-right: 1em;
  padding-top: 1em;
  padding-bottom: 1em;
  display: flex;
  width: auto;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  writing-mode: vertical-lr;
  text-orientation: upright;
  /* Workaround - width parent acknowledge wrap */
}


.container .slot {
  border: 1px solid gray;
  height: var(--slot-size);
  width: var(--slot-size);
  margin: 0.5rem;
  position: relative;
  writing-mode: horizontal-tb;
  box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;

}

.slot.is-available-to-drop {
  backface-visibility: hidden;
  will-change: transform;
	transform: scale(1);
	animation: pulse 0.8s infinite;
}

@keyframes pulse {
	0% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
	}

	70% {
		transform: scale(1);
		box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
	}

	100% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
	}
}

@keyframes pulseHover {
	0% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(24, 148, 219, 0.7);
	}

	70% {
		transform: scale(1);
		box-shadow: 0 0 0 10px rgba(204, 31, 31, 0);
	}

	100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(204, 31, 31, 0);
	}
}

#movable-element {
  /* border: 1px solid green; */
  /* background-color: #00ff0033; */
  height: 100%;
  width: 100%;
}

.slot.hover {
  border: 1px solid lightskyblue !important;
  backface-visibility: hidden;
  will-change: transform;
	transform: scale(1);
	animation: pulseHover 0.8s infinite;
}

.slot.correct {
  border: 3px solid green !important;
}

.movable-flag {
  position: absolute;
  /* background-color: #00ff0033; */
  overflow: hidden;
  height: var(--flag-height) !important;
  width: var(--flag-width);
}

.movable-flag img {
  background-color: lightblue;
  pointer-events: none;
}


.fallback-unicode {
  pointer-events: none;
  font-size: 5rem;
  line-height: 0.8;
}

.slot .movable-flag .fallback-unicode {
  width: calc(var(--slot-size) - 3rem);
  text-align: center;
  font-size: 3.5rem;
}

.slot .movable-flag {
  width: var(--slot-size);
  height: var(--slot-flag-section) !important;
  display: grid;
  justify-items: center;
  align-items: center;
}

.slot .movable-flag img {
  width: calc(var(--slot-size) - 3rem);
  text-align: center;
  font-size: 3.5rem;

}
/* 
#E0EFDE
#B3F2DD
#A882DD
*/
.movable-country {
  position: absolute;
  /* background-color: #ff000033; */
  /* color: #258EA6; */
  overflow: hidden;
  padding-top: 1rem;
  height: 3.5rem !important;
  width: 12rem !important;
  color: var(--country-color);
  line-height: 1rem;
  text-align:center;
  vertical-align: middle;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-size: 1.3rem;
}

.slot .movable-country {
  width: var(--slot-size) !important;
  height: var(--slot-country-section) !important;
  font-size: 0.85rem;
  line-height: 0.8rem;
  padding-top: 0;
  overflow: hidden;
  text-align: center;
  /* white-space: nowrap; */
  top: var(--slot-country-offset);
  justify-content: center;
}

.movable-capital {
  position: absolute;
  padding-top: 1rem;
  /* background-color: #0000ff33; */
  /* color: #9FAF90; */
  text-decoration: underline;
  color: var(--capital-color);
  text-decoration-color: #111;
  text-decoration-style: dashed;
  overflow: hidden;
  height:3.5rem !important;
  width: 12rem !important;
  line-height: 1rem;
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: flex-start;
  font-size: 1.3rem;
}

.slot .movable-capital {
  width: var(--slot-size) !important;
  height: var(--slot-capital-section) !important;
  font-size: 0.85rem;
  line-height: 0.8rem;
  text-align: center;
  overflow: hidden;
  padding-top: 0;
  /* white-space: nowrap; */
  top: var(--slot-capital-offset);
  justify-content: center;
}

#game-area {
  position: relative;
  display: flex;
  max-width: 50rem;
  width: 100%;
  height: 100%;
  justify-content: space-between;
  margin-right: env(safe-area-inset-right);
  margin-left: env(safe-area-inset-left);
  margin-bottom: env(safe-area-inset-bottom);
  margin-top: env(safe-area-inset-top);
}

#game-overview {
  pointer-events: none;
  z-index: 2;
  position: absolute;
  left: 0;
  right: 0;
  margin-right: env(safe-area-inset-right);
  margin-left: env(safe-area-inset-left);
  margin-bottom: env(safe-area-inset-bottom);
  margin-top: env(safe-area-inset-top);
  padding: 0.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 2rem;
  padding-right: 1rem;
}

#game-overview span {
  font-size: 1.6rem;
  margin:0;
  width: 4.5rem;
  text-align: center;
  align-self: center;
}

#game-overview span {
  margin-right: 0.1rem;
}

#game-overview span:first-child {
  font-size: 1rem;
}

#game-overview span:nth-child(2) {
  width: 5.5rem;
}
#game-overview span:nth-child(3) {
  font-size: 1rem;
}

h1 {
  margin: 0;
  font-size: 1.2rem;
  visibility: collapse;
}

@media (min-width: 1100px) {
  h1 {
    visibility: visible;
  }
  #game-overview {
    padding-left: unset;
    padding-right: unset;
  }
  #game-overview span {
    font-size: 2.5rem;
  }

  #game-overview span {
    margin-right: 1.5rem;
  }

  #game-overview span:first-child {
    font-size: 1.6rem;
  }
  
  #game-overview span:nth-child(2) {
    width: 8rem;
  }
  #game-overview span:nth-child(3) {
    font-size: 1.6rem;
  }
}

.restart-button,.skip-button {
  pointer-events: all;
  width: 2.7rem;
  height: 2.7rem;
  align-self: center;
  margin-right: 10px;
  margin-left: 10px;
}

#game-overview button svg {
  width: 100%;
  height: 100%;
}

.post-game-container {
  position: fixed;
  left: 0;
  right: 0;
  text-align: center;
  display: flex;
  top: 0;
  height: 100%;
  bottom: 0;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.post-game-container div {
  background-color: var(--background-color);
  border: solid 1px var(--text-color);
  padding: 2rem;
  padding-top: 1rem;
  font-size: 1.2rem;
  max-width: 30rem;
}

.lattice-container {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;

}

.lattice-flags {
  display: grid;
  grid-template-columns: var(--flag-width) var(--flag-width);
  grid-row: var(--flag-height) var(--flag-height);
  gap: 10px;
}

.lattice .movable-capital,.movable-country {
  margin-bottom: -15px;
}


.lattice .movable-flag,.movable-capital,.movable-country {
  display: block;
  position: unset;
  pointer-events: all;
}

.main-menu {
  pointer-events: all;
}

.score {
  color: var(--text-color);
}

