@font-face {
  font-family: visitor;
  src: url(../fonts/visitor.ttf);
}

body {
  margin: 0px;
}
html {
  overflow: none;
  --zoom: 1;
  --mobile-popup-spacing: 100px;
}
#editor-container {
  width: 100%;
  height: 100%;
  background-color: #2A2E4A;
  display: none;
}
#paper-canvas {
  width: 100%;
  height: 100%;
}
#map-drawing-canvas-foreign-object {
  pointer-events: none;
}

#map-svg-territories {
  transition: transform 0.1s;
}
#map-svg-territories > #map-svg-fill-territories > path {
  transition: opacity 0.1s;
}
#map-svg-territories > #map-svg-outline-territories > path {
  transition: opacity: 0.1s;
}

#toolbar-full {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  height: 80px;
}
#toolbar-full > .toolbar-part {
  margin-left: 20px;
  background-color: rgb(70, 80, 119);
  border-radius: 10px;
  display: flex;
}
#toolbar-full > .toolbar-part:first-child {
  margin-left: 0px;
}
#toolbar-full > .toolbar-part > .toolbar-element {
  display: flex;
  flex-direction: column;
  padding: 10px;
  padding-bottom: 7px;
  box-sizing: border-box;
  align-items: center;
  width: 80px;
  align-items: center;
  height: 100%;
  cursor: pointer;
  justify-content: space-between;
}
#toolbar-full > .toolbar-part > .toolbar-element.disabled {
  cursor: default;
}
#toolbar-full > .toolbar-part > .toolbar-element > .toolbar-element-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  height: 45px;
}
#toolbar-full > .toolbar-part > .toolbar-element:not(.disabled):hover > .toolbar-element-top {
  background-color: #404869;
}
#toolbar-full > .toolbar-part > .toolbar-element.selected > .toolbar-element-top {
  background-color: #41475E;
}
#toolbar-full > .toolbar-part > .toolbar-element > .toolbar-element-top > img {
  height: 70%;
}
#toolbar-full > .toolbar-part > .toolbar-element.disabled > .toolbar-element-top > img {
  opacity: 0.5;
}

#toolbar-full > .toolbar-part > .toolbar-element > .toolbar-element-bottom {
  color: white;
  opacity: 80%;
  font-family: rubik;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  height: 15px;
}
#toolbar-full > .toolbar-part > .toolbar-element.disabled > .toolbar-element-bottom {
  opacity: 40%;
}

/* toolbar element popup */
#toolbar-element-popup {
  position: absolute;
  bottom: 90px;
  left: 0px;
  width: 100px;
  background-color: #404869;
  height: fit-content;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transform: translateX(-10px);
}
#toolbar-element-popup > .tool-section {
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#toolbar-element-popup > .tool-section > * {
  padding: 6px;
  box-sizing: border-box;
  cursor: pointer;
}
#toolbar-element-popup > .tool-section > *:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
#toolbar-element-popup > .tool-section > *:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

#toolbar-element-popup > .tool-section > *:hover {
  background-color: rgb(52 61 95);
}
#toolbar-element-popup > .tool-section > * > * {
  cursor: pointer;
}
#toolbar-element-popup > .tool-section > .color-picker-button-container > .color-picker-button {
  aspect-ratio: 1 / 1;
  width: 100%;
  background-color: red;
  border: none;
  border-radius: 5px;
}
#toolbar-element-popup > .tool-section > p {
  margin: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: rubik;
}
#toolbar-element-popup > .tool-section > p > .value {
  background-color: rgb(52 61 95);
  border-radius: 5px;
  padding: 1px;
  padding-inline: 5px;
  margin-left: 5px;
}
#toolbar-element-popup > .tool-section > button {
  display: flex;
  width: 100%;
  align-items: center;
  padding-inline: 15px;
  background-color: transparent;
  height: 45px;
  border: 0px;
  outline: 0px;
}
#toolbar-element-popup > .tool-section > button > img {
  height: 40%;
  margin-right: 5px;
}
#toolbar-element-popup > .tool-section > button > p {
  margin: 0px;
  font-family: rubik;
  color: white;
  margin-left: 5px;
  font-size: 18px;
}
#pen-color-picker-button {
  padding: 0px;
}
#pen-color-picker-button > * {
  height: 100%;
  width: 100%;
  visibility: none;
}

#pen-color-picker-button .clr-field button, #pen-color-picker-button .clr-field input {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  cursor: pointer !important;
}


/* properties panel */
#properties-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 20px;
  top: 20px;
  height: calc(100% - 40px);
  width: 300px;
  background-color: rgb(70, 80, 119);
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
  transition: opacity 0.1s;
}
#elements-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 20px;
  top: 20px;
  height: calc(100% - 40px);
  width: 300px;
  background-color: rgb(70, 80, 119);
  padding: 10px;
  box-sizing: border-box;
  border-radius: 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
#elements-panel::-webkit-scrollbar {
  border: 10px solid transparent;
  width: 10px;
}
#elements-panel::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.1)!important;
  border-radius: 100px;
  -webkit-border-radius: 100px;
  -moz-border-radius: 100px;
  -ms-border-radius: 100px;
  -o-border-radius: 100px;
  width: 3px;
}
#properties-panel > .properties-mode {
  width: 100%;
  flex-direction: column;
}
#properties-panel .properties-section-title, #elements-panel .properties-section-title {
  text-transform: uppercase;
  font-family: rubik;
  border-bottom: #d1daff 1px solid;
  margin: 0px;
  font-size: 14px;
  padding: 2px;
  box-sizing: border-box;
  padding-top: 0px;
  color: white;
  font-weight: 400;
  width: 100%;
}
#properties-panel .properties-subsection-title {
  color: white;
  font-family: rubik;
  margin: 0px;
  margin-top: 7px;
  margin-bottom: 7px;
  font-size: 24px;
}
#elements-panel .elements-panel-element {
  align-items: center;
  background-color: initial;
  background-color: rgba(0,0,0,.03);
  border-radius: 3px;
  box-sizing: border-box;
  color: hsla(0,0%,100%,.8);
  cursor: pointer;
  display: flex;
  font-family: rubik;
  height: 25px;
  justify-content: space-between;
  margin-top: 3px;
  padding-inline: 8px;
  transition: background-color .1s;
  width: 100%;
}
#elements-panel .elements-panel-element:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
#elements-panel .elements-panel-element.selected {
  background-color: rgba(0, 0, 0, 0.1);
}
#elements-panel .elements-panel-element > .left {
  display: flex;
  height: 100%;
  align-items: center;
  overflow: hidden;
}
#elements-panel .elements-panel-element > .left > img {
  height: 50%;
  margin-right: 5px;
}
#elements-panel .elements-panel-element > .left > .elements-panel-element-label {
  margin: 0px;
  overflow-x: hidden;
  overflow-y: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#elements-panel .elements-panel-element > .right {
  display: flex;
  height: 100%;
  width: fit-content;
}
#elements-panel .elements-panel-element > .right > button {
  height: 100%;
  margin-left: 5px;
  padding: 2.5px;
  box-sizing: border-box;
  border-radius: 50%;
  background-color: transparent;
  border: none;
  width: 25px;
  height: 25px;
  cursor: pointer;
}
#elements-panel .elements-panel-element > .right > button:hover {
  background-color: rgba(0, 0, 0, 0.1)
}
#properties-panel .two-sides-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 5px;
}

#properties-panel textarea {
  background-color: rgba(255, 255, 255, 0.1);
  border: 0px;
  outline: 0px;
  padding: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 35px;
  max-height: 100px;
  font-family: rubik;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom: 2px solid white;
  color: white;
  font-size: 16px;
  resize: none;
  transition: background-color 0.1s;
}
#properties-panel textarea:hover, #properties-panel textarea:focus {
  background-color: rgba(255, 255, 255, 0.15);
}

@media only screen and (max-width: 1600px) {
  #toolbar-full {
    transform: translateX(-50%) scale(0.9);
  }
}
@media only screen and (max-width: 1420px) {
  #properties-panel, #elements-panel {
    width: 250px;
  }
}
@media only screen and (max-width: 1250px) {
  #toolbar-full {
    transform: translateX(-50%) scale(0.8);
  }
}

svg {
  text-rendering: optimizeSpeed;
  color-rendering: optimizeSpeed; 
  shape-rendering: optimizeSpeed;
}

#map-svg > #map-svg-fill-territories {
  cursor: pointer;
}
#map-svg .text-path {
  pointer-events: none;
}
#map-svg.text {
  cursor: crosshair;
}
#map-svg.text .text-path {
  cursor: pointer;
  pointer-events: auto;
}



/* mobile */
#toolbar-full-mobile {
  position: fixed;
  bottom: 0px;
  left: 0px;
  width: 100vw;
  height: 75px;
  background-color: #404869;
  border-top: 4px solid #333c5a;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  box-sizing: border-box;
}
#toolbar-full-mobile > button.normal {
  width: 100%;
  max-width: 100%;
  height: calc(75px - 4px);
  display: flex;
  flex-direction: column;
  padding: 7px;
  box-sizing: border-box;
  background-color: transparent;
  align-items: center;
  border: 0px;
  justify-content: space-between;
  margin-bottom: 5px;
}
#toolbar-full-mobile > button.normal > img {
  height: 69%;
  margin-bottom: 2px;
  scale: 0.95;
}
#toolbar-full-mobile > button.normal > div {
  color: white;
  font-family: rubik;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0px;
  font-size: 10px;
  max-height: 50px;
  padding: 0px;
  height: fit-content;  
}

#toolbar-full-mobile > button.special {
  width: 100%;
  height: 90px;
  translate: 0% -20px;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 0px;
  padding: 5.6px;
  box-sizing: border-box;
}
#toolbar-full-mobile > button.special > .tool-image {
  border-radius: 50%;
  background-color: #333c5a;
  padding: 5px;
  box-sizing: border-box;
  height: 60%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  scale: 1.2;
}
#toolbar-full-mobile > button.special > .tool-image > img {
  width: 80%;
  height: 80%;
  aspect-ratio: 1 / 1;
  scale: 0.9;
}
#toolbar-full-mobile > button.special > .tool-text {
  color: white;
  font-family: rubik;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0px;
  font-size: 10px;
  max-height: 50px;
  padding: 0px;
  height: fit-content;

}


#tools-list-container {
  min-width: 100px;
  border-radius: 10px;
  background-color: #455077;
  height: 40px;
  padding: 7px;
  display: flex;
}
#tools-list-container-popup {
  height: 18px;
}
#tools-list-outer-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  display: none;
}

#tools-list-container > img {
  border-radius: 5px;
  height: 40px;
  width: 40px;
  padding: 5px;
  box-sizing: border-box;
  margin-right: 13px;
}
#tools-list-container > img:last-child {
  margin-right: 0px;
}
#tools-list-container > .smaller {
  padding: 6px;
  box-sizing: border-box;
}
#tools-list-container > img.selected {
  background-color: #333c5a;
}


@media (pointer: coarse) {
  #properties-panel, #properties-panel {
    position: fixed;
    left: 0px;
    top: var(--mobile-popup-spacing);
    height: calc(100vh - var(--mobile-popup-spacing) * 2);
    width: 100%;
    border-radius: 0px;
    padding: 15px;
    z-index: 100;
    display: none;
    overflow: auto;
  }
}
#popup-shadow {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0px;
  left: 0px;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

#align-text {
  display: flex;
  height: 50px;
  box-sizing: border-box;
}
#align-text > button {
  flex-grow: 1;
  border: 2px solid rgba(223, 223, 223, 0.39);
  border-right: 0px;
  outline: 0px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 5px;
  box-sizing: border-box;
  min-width: 1;
}
#align-text > button.selected {
  background-color: rgba(255, 255, 255, 0.1);
}
#align-text > button:first-child {
  border-bottom-left-radius: 5px;
  border-top-left-radius: 5px;
}
#align-text > button:last-child {
  border-bottom-right-radius: 5px;
  border-top-right-radius: 5px;
  border-right: 2px solid rgba(241, 241, 241, 0.39);

}
#align-text > button > img {
  height: 100%;
}


#map-svg.marker {
  cursor: crosshair;
}
#map-svg.marker .marker-path {
  cursor: pointer;
  pointer-events: auto;
}


.pick-image-popup-shadow {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
}
.pick-image-popup-container {
  display: flex;
  flex-direction: column;
  width: 800px;
  height: 500px;
  background-color: #F0F2FF;
  border-radius: 10px;
  overflow: hidden;
}
.pick-image-popup-header {
  width: 100%;
  height: 60px;
  background-color: #2A2E4A;
  display: flex;
  align-items: center;
  padding-left: 20px;
  justify-content: space-between;
  box-sizing: border-box;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.pick-image-popup-header > h2 {
  font-family: rubik;
  color: white;
  font-weight: 400;
}
.pick-image-popup-header > button {
  aspect-ratio: 1 / 1;
  height: 100%;
  background-color: transparent;
  border: none;
  cursor: pointer;
}
.pick-image-popup-header > button > img {
  height: 30%;
}



.pick-image-popup-content {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 140px;
  width: 100%;
  gap: 15px;
  padding: 15px;
  box-sizing: border-box;
  overflow: auto;
}
.pick-image-popup-content > * {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgba(67, 72, 91, 40%);
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  cursor: pointer;
  justify-content: flex-end;
  transition: scale 0.1s;
}
.pick-image-popup-content > *:hover {
  scale: 1.1;
  outline: #189FF6 3px solid;
}
.pick-image-popup-content > input {
  display: none;
}
.pick-image-popup-content > label > img {
  height: 80px;
  translate: 5px;
}
.pick-image-popup-content > label > p {
  margin: 0px;
  height: 40px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: rubik;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 14px;
}

.pick-image-popup-content > div {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
}
.pick-image-popup-content > div > p {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
  margin: 0px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: rubik;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 14px;
  margin-left: 10px;
  text-align: left;
  width: 100%;
  justify-content: flex-start;
  overflow-x: hidden;
}

.pick-image-popup-content::-webkit-scrollbar {
  width: 16px;
}
.pick-image-popup-content::-webkit-scrollbar-thumb {
  background-color: #7b7d7f;
  border: 5px solid #F0F2FF;
  border-radius: 10rem;
}
.pick-image-popup-content::-webkit-scrollbar-track {
  position: absolute;
  right: -3rem;
  top: -50rem;
  background: transparent;
}


#drag-place-image-notification {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px;
  background-color: #189FF6;
  font-family: rubik;
  color: white;
  font-weight: 500;
  border-radius: 5px;
  font-size: 20px;
  pointer-events: none;
  display: none;
}

#map-svg.image-drag-activated {
  cursor: crosshair;
}
#map-svg.image-drag-activated .image-path {
  pointer-events: none;
}
#map-svg.image-drag-activated #svg-editor-interface {
  pointer-events: none;
}



#download-map-popup-content {
  display: flex;
  flex-direction: row;
  padding: 20px;
  box-sizing: border-box;
  flex-grow: 1;
  justify-content: space-between;
}
#download-map-popup-content > * {
  width: 50%;
  height: 100%;
}
#download-map-popup-content > .image-side {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45%;
}
#download-map-popup-content > .image-side > img {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(rgba(0, 0, 0, 0.3) 0px 0px 10px);
}
#download-map-popup-content > .settings-side h4 {
  margin: 0px;
  font-family: rubik;
  font-weight: 400;
  font-size: 25px;
  margin-bottom: 10px;
  margin-top: 10px;
}
#download-map-popup-content > .settings-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#download-map-popup-content .dimensions-inputs {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
#download-map-popup-content .dimensions-inputs > * {
  width: 47.5%;
}
#download-map-popup-content input {
  border: 0px;
  outline: 0px;
  padding: 10px;
  padding-left: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 35px;
  max-height: 100px;
  font-family: rubik;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  color: black;
  font-size: 16px;
  resize: none;
  transition: background-color 0.1s;
  border-bottom: 2px rgba(0, 0, 0, 0.3) solid;
  background-color: rgba(0, 0, 0, 0.07);
  height: 55px;
}
#download-map-popup-content input:hover, #download-map-popup-content input:focus {
  border-bottom: 2px black solid;
  background-color: rgba(0, 0, 0, 0.1);
}
#download-map-popup-container {
  overflow: initial;
}



#download-map-button {
  height: 45px;
  background-color: #189FF6;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-family: rubik;
  font-weight: 500;
  border: none;
  outline: none;
  padding: 0px;
  padding-inline: 10px;
  padding-left: 15px;
  border-radius: 5px;
  box-shadow: var(--material-button-box-shadow);
  transition: background-color 0.15s;
}
#download-map-button:hover {
  background-color: var(--material-button-color-hover);
}
#download-map-button > img {
  margin-left: 10px;
  height: 50%;
}


@media (pointer: coarse) {
  #toolbar-full {
    transform: initial !important;
    left: 10px !important;
    top: 0px;
  }
  #toolbar-element-popup {
    width: 100vw !important;
    max-height: 100px !important;
    bottom: unset;
  }
  #toolbar-element-popup > .tool-section > .color-picker-button-container > .color-picker-button {
    aspect-ratio: unset;
    height: 50px;
  }
}


