/* ==========================================================================
   Your custom CSS styles
   ========================================================================== */

:root {
  --background-color: #1f1f1f;
  --left-background-color: #292929;
  --border-color: #272525;
  --main-green: rgba(43, 145, 99, 1);
  --hover-green: rgba(25, 83, 57, 1);
  --dot-shadow-color: rgba(43, 145, 99, 1);
  --dot-color: rgba(25, 83, 57, 1);
  --visited-green: rgba(43, 145, 99, 1);
  --brand-color: ghostwhite;
  --label-color: lightgray;
  --chart-background: #1f1f1f;
  --chart-border: #1f1f1f;
  --button-background: #292929;
  --button-border: #272525;
  --map-background: #1f1f1f;
}

/*
-main-green: rgba(43, 145, 99, 1);
  --hover-green: rgba(25, 83, 57, 1);
*/

/* MapBox */
.mapboxgl-popup {
  max-width: 200px;
  font-family: "Inter", sans-serif;
}

.mapboxgl-popup-content {
  display: flex;
  flex-direction: column;
  padding: 0px;
  background-color: #1f1f1f;
  color: white;
  border-radius: 4px;
  border: 1px rgba(43, 145, 99, 1);
  padding-left: 4px;
}

.mapboxgl-popup-tip {
  background-color: transparent;
}

.mapboxgl-popup-close-button {
  color: #1f1f1f;
}

.mapboxgl-popup-close-button:before {
  content: "×";
  font-size: 16px;
  font-weight: bold;
}
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
  border-bottom-color: transparent;
}
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
  border-top-color: #1f1f1f;
}
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
  border-right-color: transparent;
}
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-left-color: transparent;
}

.mapbox-custom-group {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapbox-popup-right {
  background: rgba(25, 83, 57, 1);
  padding: 4px;
}

/* Scrollbar for web */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track-piece {
  background-color: #1f1f1f;
}
::-webkit-scrollbar-thumb:vertical {
  height: 30px;
  background-color: rgba(43, 145, 99, 1);
}

/* MAIN */

body {
  background-color: var(--background-color);
  margin: 0;
  font-family: "Inter", sans-serif;
  overflow: hidden;
}

main {
  display: flex;
}

a {
  color: var(--main-green);
  text-decoration: none;
}
a:visited {
  color: var(--visited-green);
}
a:hover {
  color: var(--hover-green);
}


table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  color: lightgray;
  overflow: auto; 
  table-layout: fixed; 
}

table th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

th, td {
  white-space: nowrap; /* Prevent text from wrapping */
  overflow: hidden; /* Hide overflowing content */
  text-overflow: ellipsis; /* Show ellipsis for overflowed content */
}

th {
  font-size: 0.7rem;
  padding: 8px;
  position: relative;
  color: lightgray;
  background-color: var(--background-color);
}

td {
  background-color: var(--background-color);
  padding: 8px;
  font-size: 0.7rem;
}

#left-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: var(--left-background-color);
  border-right: 1px solid var(--border-color);
  width: 577px;
  height: 98vh;
  padding: 13px 13px 13px 13px;
}

#right-side {
  flex: 1;
}

.brand {
  font-size: 1.3rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  color: var(--brand-color);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--main-green);
  padding-left: 5px;
  width: fit-content;
}

.brand .dot {
  color: var(--dot-color);
  text-shadow: 1px 1px 0 var(--dot-shadow-color),
    -1px -1px 0 var(--dot-shadow-color), 1px -1px 0 var(--dot-shadow-color),
    -1px 1px 0 var(--dot-shadow-color);
}

.brand .slogan {
  font-size: 0.53rem;
  cursor: pointer;
}

.brand-globe {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  color: var(--brand-color);
  z-index: 1;
  padding: 18px 13px 0 13px;
  font-size: 1.3rem;
  font-family: "Inter", sans-serif;
}

.brand-globe .dot {
  color: var(--dot-color);
  text-shadow: 1px 1px 0 var(--dot-shadow-color),
    -1px -1px 0 var(--dot-shadow-color), 1px -1px 0 var(--dot-shadow-color),
    -1px 1px 0 var(--dot-shadow-color);
}

.brand-globe .slogan {
  font-size: 0.53rem;
  cursor: pointer;
}

.chart {
  background: var(--chart-background);
  border: 1px solid var(--chart-border);
  border-radius: 5px;
  position: relative;
  padding-bottom: 8px;
  height: 300px;
}

.group {
  background: var(--chart-background);
  border: 1px solid var(--chart-border);
  border-radius: 5px;
  position: relative;
  height: 100%;
  padding-bottom: 13px;

  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-label {
  position: absolute;
  font-size: 0.6rem;
  color: var(--label-color);
  left: 5px;
  top: 5px;
}

.chart-canvas {
  position: relative;
  top: 16px;
  right: 4px;
}

.chart-total {
  position: absolute;
  font-size: 1rem;
  color: var(--label-color);
  left: 5px;
  top: 20px;
}

.map {
  width: 100%;
  height: 100vh;
  background-color: var(--map-background);
  position: relative; /* Ensure the map is correctly positioned */
}

.parent {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns of equal width */
  grid-template-rows: repeat(2, 1fr); /* 2 rows of equal height */
  gap: 10px; /* Optional: adds space between the squares */
  width: 100%; /* Set a fixed width */
  height: 400px; /* Set a fixed height */
  justify-content: center;
}

.chart {
  color: white;
}

button,
.interactive {
  background: var(--button-background);
  border: 1px solid var(--button-border);
  border-radius: 5px;
  color: white;
  padding: 8px;
}

button:hover,
.interactive:hover {
  background: var(--hover-green);
}

/* Loader */
/* HTML: <div class="loader"></div> */
.loader {
  width: 4px;
  color: var(--label-color);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 19px -19px 0 0px, 38px -19px 0 0px, 57px -19px 0 0px, 19px 0 0 5px,
    38px 0 0 5px, 57px 0 0 5px, 19px 19px 0 0px, 38px 19px 0 0px,
    57px 19px 0 0px;
  transform: translateX(-38px);
  animation: l26 2s infinite linear;
}
@keyframes l26 {
  12.5% {
    box-shadow: 19px -19px 0 0px, 38px -19px 0 0px, 57px -19px 0 5px,
      19px 0 0 5px, 38px 0 0 0px, 57px 0 0 5px, 19px 19px 0 0px, 38px 19px 0 0px,
      57px 19px 0 0px;
  }
  25% {
    box-shadow: 19px -19px 0 5px, 38px -19px 0 0px, 57px -19px 0 5px,
      19px 0 0 0px, 38px 0 0 0px, 57px 0 0 0px, 19px 19px 0 0px, 38px 19px 0 5px,
      57px 19px 0 0px;
  }
  50% {
    box-shadow: 19px -19px 0 5px, 38px -19px 0 5px, 57px -19px 0 0px,
      19px 0 0 0px, 38px 0 0 0px, 57px 0 0 0px, 19px 19px 0 0px, 38px 19px 0 0px,
      57px 19px 0 5px;
  }
  62.5% {
    box-shadow: 19px -19px 0 0px, 38px -19px 0 0px, 57px -19px 0 0px,
      19px 0 0 5px, 38px 0 0 0px, 57px 0 0 0px, 19px 19px 0 0px, 38px 19px 0 5px,
      57px 19px 0 5px;
  }
  75% {
    box-shadow: 19px -19px 0 0px, 38px -19px 0 5px, 57px -19px 0 0px,
      19px 0 0 0px, 38px 0 0 0px, 57px 0 0 5px, 19px 19px 0 0px, 38px 19px 0 0px,
      57px 19px 0 5px;
  }
  87.5% {
    box-shadow: 19px -19px 0 0px, 38px -19px 0 5px, 57px -19px 0 0px,
      19px 0 0 0px, 38px 0 0 5px, 57px 0 0 0px, 19px 19px 0 5px, 38px 19px 0 0px,
      57px 19px 0 0px;
  }
}

/*
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

a:visited {
  color: #6c757d;
}

.inter-normal {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}

.inter-semi-medium {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

body {
  font-family: "Inter", sans-serif;
  color: rgba(246, 246, 246, 1);
  width: 150px;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.group {
  display: flex;
  flex-direction: column;
  margin-top: 11px;
  margin-left: 11px;
  z-index: 1;
  gap: 5px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.mini-group {
  display: flex;
  flex-direction: column;
  z-index: 1;
}
*/
/* BRAND 

#brand-group {
  display: flex;
  flex-direction: column;
  z-index: 1;
}

#brand.branding {
  color: white;
  padding: 5px;
  border-radius: 3px;
  width: fit-content;
  font-size: 1.3rem;
}
*/
/* WEBSOCKET 

#websocket-status {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#websocket-status.ws-connected {
  background: rgba(25, 83, 57, 1);
  color: white;
  padding: 5px;
  border: 1px solid rgba(43, 145, 99, 1);
  border-radius: 3px;
  width: fit-content;
  font-size: 0.8rem;
}

#websocket-status.ws-disconnected {
  background: rgba(128, 128, 128, 1);
  color: white;
  padding: 5px;
  border: 1px solid rgba(169, 169, 169, 1);
  border-radius: 3px;
  width: fit-content;
  font-size: 0.8rem;
}
*/
/* COLOR COORDINATION 

.color-label {
  display: flex;
  align-items: center;
}

.cube {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.cube.range-0-1000 {
  background-color: transparent;
  border-color: transparent;
}

.cube.range-1001-10000 {
  background-color: rgba(100, 100, 160, 1);
  border-color: rgba(140, 140, 200, 1);
}

.cube.range-10001-100000 {
  background-color: rgba(90, 150, 240, 1);
  border-color: rgba(120, 180, 255, 1);
}

.cube.range-100001-200000 {
  background-color: rgba(50, 130, 230, 1);
  border-color: rgba(80, 160, 255, 1);
}

.cube.range-200001-300000 {
  background-color: rgba(30, 110, 220, 1);
  border-color: rgba(60, 140, 250, 1);
}

.cube.range-300001-400000 {
  background-color: rgba(140, 90, 230, 1);
  border-color: rgba(180, 130, 255, 1);
}

.cube.range-400001-500000 {
  background-color: rgba(210, 120, 70, 1);
  border-color: rgba(255, 150, 100, 1);
}

.cube.range-500001-600000 {
  background-color: rgba(210, 150, 40, 1);
  border-color: rgba(255, 180, 70, 1);
}

.cube.range-600001-700000 {
  background-color: rgba(200, 110, 30, 1);
  border-color: rgba(240, 130, 50, 1);
}

.cube.range-700001-800000 {
  background-color: rgba(190, 70, 30, 1);
  border-color: rgba(230, 90, 50, 1);
}

.cube.range-800001-900000 {
  background-color: rgba(180, 20, 20, 1);
  border-color: rgba(210, 40, 40, 1);
}

.cube.range-900001-1000000 {
  background-color: rgba(140, 5, 5, 1);
  border-color: rgba(180, 10, 10, 1);
}

#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
  */

/* ==========================================================================
   Your custom CSS styles for smartphones and screens smaller than 480 px
   ========================================================================== */

@media only screen and (min-width: 768px) {
  /* tablets and desktop */
  .brand-globe {
    display: none;
  }
}

@media only screen and (max-width: 767px) {
  #left-side {
    display: none;
  }
  .brand-globe {
    display: block;
  }
}

@media only screen and (max-width: 1176px) {
  #left-side {
    display: none;
  }
  .brand-globe {
    display: block;
  }
}

@media only screen and (max-width: 767px) and (orientation: portrait) {
  #left-side {
    display: none;
  }
  .brand-globe {
    display: block;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

.hidden {
  display: none !important;
  visibility: hidden;
}

/* Clearfix
 * Adding a 'clearfix' class will allow parent elements to contain a floated child element
 */

.clearfix:before,
.clearfix:after {
  content: " "; /* 1 */
  display: table; /* 2 */
}

.clearfix:after {
  clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
  zoom: 1;
}
