:root {
  --gap: 25px;
  --main: #111e6c;
  --accent: cyan;
  --secondary: #4a538d;
  --third: #664a7c;
  --trackerSpace: 60px;
  --trackerCircleWidth: 15px;
}

body {
  font-family: Arial;
  margin: 0;
  padding: 0;
}

/* Header */
.header {
  background-color: var(--blue);
  box-shadow: 1px 1px 5px 0px var(--grey);
  position: sticky;
  top: 0;
  width: 100%;
  /* Sona - added z-index */
  z-index: 99999;
}

.clear {
  width: 100%;
  height: 30px; /*border:1px solid black;*/
  clear: both;
}

.flight-container {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap);
  max-width: 850px;
}

.flight-row:not(:first-child) {
  justify-content: space-between;
}

.flight-row:nth-child(2) {
  align-items: flex-start;
}

.flight-row {
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.flight-col {
  line-height: 1.3;
}

.flight-logo-wrapper {
  cursor: pointer;
  min-width: 90px;
  height: 120px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flight-logo {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.flight-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flight-info > div:first-child {
  font-size: 35px;
  color: var(--main);
}

.flight-id {
  color: var(--secondary);
  font-size: 15px;
  font-weight: 200;
}

.flight-update-link {
  color: var(--main);
  font-size: 13px;
  font-weight: bold;
}

.flight-info > div:last-child {
  color: black;
  font-size: 16px;
  padding: 10px 10px 10px 0;
  background: linear-gradient(to left, #00ffff57, white);
}

.flight-status {
  font-weight: bold;
  font-size: 20px;
}

.flight-airport-code {
  font-size: 22px;
  font-weight: 200;
  color: var(--secondary);
  text-transform: uppercase;
}

.flight-city {
  text-transform: uppercase;
  font-weight: bold;
  color: var(--main);
}

.flight-gate {
  font-weight: bold;
}

.flight-airport-link {
  color: darkslateblue;
  text-decoration: none;
  border-bottom: 1px dashed;
}

.flight-gate-info {
  margin-top: 10px;
  font-size: 14px;
}

.flight-row:not(:first-child) > div:nth-child(2) {
  text-align: right;
}

.flight-day {
  font-size: 18px;
}

.flight-time {
  font-weight: 500;
}

.flight-day + div {
  background: black;
  color: var(--accent);
  padding: 3px 5px;
  position: relative;
  border-radius: 3px;
  font-family: monospace;
  font-size: 16px;
  text-shadow: 0 0 10px var(--accent);
  box-shadow: inset 0 0 7px white, 0 0 5px cyan;
  margin: 5px 0;
}

.flight-delay {
  font-size: 14px;
  color: greenyellow;
}

.flight-tracker {
  height: 3px;
  position: relative;
  background: var(--main);
  width: calc(100% - var(--trackerSpace));
  margin: 0 calc(var(--trackerSpace) / 2);
}

.flight-tracker::before,
.flight-tracker::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  width: var(--trackerCircleWidth);
  height: var(--trackerCircleWidth);
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-100%, -50%);
  z-index: -1;
}

.flight-tracker::after {
  transform: translate(0, -50%);
  left: 100%;
}

.flight-day + div::after {
  content: "";
  display: block;
  position: absolute;
  width: 3px;
  height: calc(var(--gap) + (var(--trackerCircleWidth) / 2));
  background: var(--accent);
  z-index: -1;
  top: 100%;
  left: calc((var(--trackerSpace) / 4) + (var(--trackerCircleWidth) / 2));
  transform: translateX(-50%);
}

.flight-day.end-day + div::after {
  left: calc(100% - (var(--trackerSpace) / 4) - (var(--trackerCircleWidth) / 2));
}

.flight-tracker .airplane {
  display: block;
  background: url("../images/airplane.svg") no-repeat center center/contain;
  width: 35px;
  height: 35px;
  position: absolute;
  top: -16px;
  left: 0;
  z-index: 5;
  filter: drop-shadow(0 0 10px var(--accent));
  transform: rotate(90deg);
}

.flight-tracker[data-percentage="100"] .airplane,
.flight-tracker[data-flying="false"] .airplane {
  background: url("../images/airplane_calm.svg") no-repeat center center/contain;
  transform: rotate(0) translateX(-1px);
  filter: drop-shadow(1px 3px 3px rgba(0,0,0,0.8));
}

.flight-path-progress {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: calc(var(--gap) / 2);
}

.tooltip-like {
  display: inline-block;
  position: relative;
  background: var(--third);
  color: white;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
}

.tooltip-like::before {
  content: "";
  position: absolute;
  display: block;
  width: 15px;
  height: 15px;
  background: linear-gradient(to right bottom, var(--third) 50%, rgba(255, 255, 255, 0) 50%);
  transform: rotate(45deg) translateY(-50%);
  top: 0;
  left: 35px;
}

.flight-path-progress > div:last-child > .tooltip-like::before {
  left: unset;
  right: 35px;
}

.flight-miles {
  margin-top: 5px;
  text-align: center;
  font-size: 14px;
  color: var(--third);
}

.flight-total-time {
  color: var(--secondary);
}

#image-container, 
#map {
  width: calc(100vw - (var(--gap) * 2));
  max-width: 600px;
  max-height: 500px;
  height: calc(100vw - (var(--gap) * 2));
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  position: relative;
}

#zoomIn,
#zoomOut,
button[id*="move"] {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height:25px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px;
}

#zoomIn {
  top: 34px;
}

#canvas {
  transform-origin: center;
}

#moveUp {
  right: 20px;
  left: unset;
}

#moveRight {
  right: 3px;
  left: unset;
  top: 34px;
}

#moveDown {
  right: 20px;
  left: unset;
  top: 64px;
}

#moveLeft {
  right: 38px;
  left: unset;
  top: 34px;
}

/* map styles */
#map {
  width: calc(100vw - (var(--gap) * 2));
  max-width: 850px;
  max-height: 500px;
  height: calc(100vw - (var(--gap) * 2));
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  position: relative;
}

.leaflet-popup-close-button {
  display: none !important;
  pointer-events: none !important;
}

.leaflet-div-icon {
  background: none;
  border: none;
}

/* opaque background popup */
.leaflet-popup-content-wrapper, 
.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0);
  box-shadow: none;
}

.leaflet-popup-content {
  margin: 0 24px 0 20px;
}

.custom-marker, .custom-icon-wrapper {
  transform-origin: center;
}

.leaflet-marker-icon,
.leaflet-marker-pane,
.custom-marker-wrapper,
.custom-marker {
  pointer-events: none !important;
}

/* searchbar */
.searchbar-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: var(--gap);
  max-width: 850px;
  /*height: 25px;*/
  position: relative;
  margin: 0 auto;
  /*margin-top: 100px;*/
}

#search_btn {
    background: url(../images/search.svg) no-repeat center 55%/54%, var(--main);
    width: 35px;
    height: 25px;
    padding: 0;
    border: none;
    opacity: 0.6;
    transition: all 0.5s ease-in;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
}

#search {
    padding: 1px 5px;
    border: thin solid var(--third);
    border-radius: 5px;
    height: 25px;
    outline: none !important;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    transition: all 0.5s ease-in;
}

#search:focus {
  box-shadow: 1px 3px 5px #664a7c66;
}

#search:focus + #search_btn,
#search_btn:hover {
  opacity: 1;
}

#map_info_form {
  display: none;
}

.center {
  width: 800px;
  margin: 0 auto;
  display:flex;
}
.mblock {width: 70%;
    margin: 0 auto;

}
@media screen and (max-width: 767px) {
  :root {
    --gap: 15px;
    --trackerSpace: 40px;
    --trackerCircleWidth: 10px;
  }
  
  .clear {
  width: 100%;
  height: 20px; /*border:1px solid black;*/
  clear: both;
}  

#search_btn {
    background: url(../images/search.svg) no-repeat center 55%/54%, var(--main);
    width: 105px;
    height: 25px;
    padding: 0;
    border: none;
    opacity: 0.6;
    transition: all 0.5s ease-in;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
}

.mblock {width: 99%; /*height: 90%; border: 1px solid #000;*/}
.center {
        width: 99%;
       /* margin: 0 auto;
        display:flex; */
    }

  button[id*="move"] {
    display: none;
  }

  .flight-info > div:first-child {
    font-size: 25px;
  }

  .flight-info {
    gap: 8px;
  }

  .flight-info > div:last-child {
    padding: 5px 10px 5px 0;
  }

  .flight-status {
    font-size: 18px;
  }

  .flight-info > div:last-child,
  .flight-day {
    font-size: 13px;
  }

  .flight-airport-code {
    font-size: 16px;
  }

  .flight-city,
  .flight-gate,
  .flight-airport-link,
  .flight-miles {
    font-size: 13px;
  }

  .flight-day + div{
    line-height: 0.7;
    display: flex;
    flex-direction: column;
    padding: 11px 5px;
  }

  .flight-day + div > span {
    display: block;
    text-align: center;
    font-size: 13px;
  }

  .flight-day.end-day + div {
    flex-direction: column;
  }

  .flight-tracker .airplane {
    width: 29px;
    height: 29px;
    top: -13px;
  }

  .tooltip-like {
    font-size: 13px;
    letter-spacing: 1px;
    padding: 5px 6px;
  }

  .tooltip-like::before {
    left: 20px;
  }

  .tooltip-like::after {
    right: 20px;
  }

  .flight-total-time {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  #zoomIn,
  #zoomOut {
    font-weight: bold;
    font-size: 25px;
    width: 35px;
    height: 30px;
  }

  #zoomIn {
    top: 38px;
    padding-left: 35px;
    padding-right: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  #zoomIn::after {
    content: "—";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    font-size: 18px;
    text-shadow: 0 1px;
  }
}