:root {
    --color: #000;
    --highcolor: #888888;
    --bgcolor: #00000055;
    --bgcolordark: #000000cc;
    --bgcolorlight: #d9d9d9cc;
}
@font-face {
    font-family: 'Burbank';
    src: url('Assets/font/burbankbigcondensed_black.otf') format('opentype');
}

body, html {
    color:#fff;
    background: var(--bgcolor);
    margin:0;
    padding:0;
    overflow:auto;
    height:auto;
    font-family: 'Burbank', 'Reem Kufi';
    /* perspective: 100px; */
}

.primary {
    background-color: var(--color);
    -webkit-mask-image: var(--icon-url);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: var(--icon-url);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}


html, body { height: 100%; margin: 0; }
#map { 
    width: 100%;
    height: 100%;
    cursor: crosshair;
}
.leaflet-tile { filter: brightness(.7) saturate(1.9) contrast(1.1); }

.controls {
    backdrop-filter: blur(4px);
    flex-direction: column;
    position: absolute;
    z-index: 1000;
    padding: 5px;
    color: var(--color);
    background: var(--bgcolor);
    border: 3px solid var(--color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.options {
    top: 10px;
    left: 10px;
}

.pencil {
    bottom: 10px;
    left: 10px;
}

.controls:hover {
    background: var(--bgcolorlight);
    border: 3px solid #000;
}

.details:hover button {
    margin: 5px 25px 5px 5px;
}

.controls button {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    margin: 5px;
    color: var(--color);
    background: var(--bgcolor);
    border: none;
    border-radius: 10px;
    /* cursor: pointer; */
    transition: all 0.3s ease;
}

.controls button:active {
    background: var(--bgcolorlight);
    /* box-shadow: 0 0 0 3px #000 inset; */
}

.controls button:hover {
    /* background: var(--bgcolordark); */
    box-shadow: 0 0 0 3px #000 inset;
}

.details:hover span {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.controls span {
    text-align: right;
    font-size: 0rem;
    font-family: 'Reem Kufi';
    font-weight: bold;
    user-select: none;
}
.controls.pencil button.active {
  /* box-shadow: 0 0 8px var(--highcolor); */
  /* transform: scale(0.7); */
  background: var(--bgcolorlight);
  box-shadow: 0 0 0 3px #000 inset;
}

.function {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#infoRest {
    display: none;
    position: absolute;
    bottom: 50%;
    right: 10px;
    max-width: 20%;
    min-width: 50px;
    z-index: 401;
    flex-direction: column;
    overflow: hidden;
    transition: max-width 0.3s ease, max-height 0.3s ease, background 3s ease, border .3s ease;
}

#infoPanel {
    display: none;
    position: absolute;
    bottom: 20px;
    right: 10px;
    max-width: 20%;
    min-width: 300px;
    max-height: 30%;
    z-index: 401;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-width 0.3s ease, max-height 0.3s ease, background 3s ease, border .3s ease;
}

.restInfoTile,
#infoName,
#infoContent {
    backdrop-filter: blur(4px);
    font-size: 1.5rem;
    font-family: 'Reem Kufi';
    margin: 5px;
    padding: 3px 10px;
    color: var(--color);
    background: var(--bgcolor);
    border: 3px solid var(--color);
    border-radius: 10px;
    cursor: default;
    transition: max-width 0.3s ease, max-height 0.3s ease, background 3s ease, border .3s ease;
}

#infoName,
#infoContent {
    display: none;
}

#infoName {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    flex-shrink: 0;
}

#infoContent {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color) var(--bgcolor);
}

#infoPanel:hover #infoContent,
#infoPanel:hover #infoName {
    background: var(--bgcolorlight);
    border: 3px solid #000;
}
#infoPanel:hover {
    max-width: 35%;
    max-height: 50%;
}
#infoPanel:hover + #infoRest {
    display: flex;
}
#infoContent::-webkit-scrollbar {
    width: 8px;
}

#infoContent::-webkit-scrollbar-track {
    background: var(--bgcolor);
    border-radius: 10px;
}

#infoContent::-webkit-scrollbar-thumb {
    background-color: var(--highcolor);
    border-radius: 10px;
    border: 2px solid var(--bgcolor);
}

#infoContent::-webkit-scrollbar-thumb:hover {
    background-color: #ff7700;
}

.flight-mode {
    cursor: crosshair;
}

.flight-line {
    stroke: #ff0000;
    stroke-width: 5;
}

.flight-label {
    font-family: 'Reem Kufi';
    font-weight: bold;
    color: #ffffff;
    font-size: 1rem;
}

.country {
    stroke: #555;
    stroke-width: 1;
    fill: #00000000;
    fill-opacity: 0.0;
    cursor: crosshair;
    pointer-events: none;
    transition: fill-opacity 0.1s ease, stroke-width 0.1s ease, stroke 0.1s ease;
}

.country-hover {
    stroke-width: 4 !important;
    fill: #000;
    fill-opacity: 0.216;
    cursor: crosshair;
}

.country-selected {
    stroke-width: 4;
    fill: #000;
    fill-opacity: 0.0;
    stroke: #000;
    transition: fill-opacity 3s ease, stroke-width 3s ease, stroke 3s ease;
}

.country-blink {
    stroke-width: 2;
    fill: #000;
    fill-opacity: 0.216;
    transition: fill-opacity 0.1s ease, stroke-width 0.1s ease, stroke 0.1s ease;
}

.restInfoTile {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.scroll-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-x linear infinite;
  animation-duration: calc(10s * var(--scroll-length, 1));
}

@keyframes scroll-x {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.edge-label,
.area-label {
    background: black;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;

    display: inline-block;
    line-height: 1.2;
    transform: translate(-50%, -50%);
}

.measure-handle {
    width: 12px;
    height: 12px;
    background: black;
    border: 2px solid white;
    border-radius: 50%;
    cursor: grab;
}

.country.comparison {
    pointer-events: all;
    cursor: grab;
    stroke-width: 4;
    fill: #000;
    fill-opacity: 0.8;
    stroke: #000;
    transition: fill-opacity 3s ease, stroke-width 3s ease, stroke 3s ease;

}

.country.comparison:active {
  cursor: grabbing;
}


.teleport-panel {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 1001;

    transform: translateX(-50%);

    gap: 6px;

    padding: 2px;
    background: var(--bgcolor);
    border: 3px solid var(--color);
    border-radius: 10px;

    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.teleport-panel:hover {
    background: var(--bgcolorlight);
    border-color: #000;
    transform: translateX(-50%) translateY(50%) scale(1.5);
}

/* .teleport-panel input {
    font-family: 'Reem Kufi';
    font-size: 1rem;
    padding: 6px 8px;

    color: var(--color);
    background: transparent;

    border: 2px solid var(--color);
    border-radius: 8px;

    outline: none;
    transition: background 0.2s ease, border 0.2s ease;
}



.teleport-panel input:focus {
    background: var(--bgcolorlight);
    border-color: #000;
} */
.teleport-panel input,
.teleport-panel button {
    font-family: 'Burbank';
    font-size: 0.8rem;
    padding: 0 8px;
    height: 20px;
    width: 40px;
    color: var(--color);
    background: var(--bgcolor);

    border: 2px solid var(--color);
    border-radius: 8px;

    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.teleport-panel input:hover,
.teleport-panel button:hover {
    box-shadow: 0 0 0 1px #000 inset;
}
.teleport-panel input:active,
.teleport-panel button:active {
    background: var(--bgcolorlight);
}
.teleport-panel input::placeholder {
    color: #000000;
}

.teleport-panel input[type="number"]::-webkit-inner-spin-button,
.teleport-panel input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.teleport-panel input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.edge-label {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=");
}

.trip-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: all;
}

.overlay-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  padding: 20px;
}

.overlay-images img {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.overlay-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}
.overlay-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto; /* scrollt, wenn zu viele Bilder */
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 20px;
  z-index: 9999;
}

.overlay-close {
  position: sticky;
  top: 10px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  align-self: flex-end;
  z-index: 10000;
}

.overlay-images {
  display: flex;
  width: 100%;
  gap: 10px;
  justify-content: center;
}

.overlay-images div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
