/* ============================================================================
   FONTS
   ============================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap");

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
  --font-family: "Ubuntu Mono", monospace;
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1em;
  color: white;
  background: black;
}

/* Links */

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-speed) var(--transition-timing);
}
a:hover {
  color: var(--secondary-color);
}

/* Canvas */

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================================
   WIND VISUALIZATION ELEMENTS
   ============================================================================ */

.wind-arrow-3d {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 16px solid var(--secondary-color);
  transform-origin: center bottom;
  pointer-events: none;
  z-index: 1 !important;
  filter: none;
  transition: transform 0.1s ease;
}

/* Demo label */

#demo-label {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: black;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 0.25rem;
  z-index: 10000;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Tooltip */

#tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 1000;
  display: none;
  white-space: nowrap;
  border: 2px solid white;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#tooltip.visible {
  display: block;
}

/* ============================================================================
   LAYOUT CONTAINERS
   ============================================================================ */

#app-container {
  display: flex;
  width: calc(100vw - 20rem);
  height: 100vh;
  overflow: hidden;
  flex-direction: column;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
}

#map-panel {
  width: 100%;
  height: 50%;
  position: relative;
  background: black;
  border-right: none;
  border-bottom: none;
  min-height: 20%;
}

/* Splitter between panels */

#splitter {
  width: 100%;
  height: 12px;
  background: black;
  cursor: ns-resize;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
  z-index: 10;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
#splitter:hover, #splitter:active {
  background: white;
}
#splitter::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 0.25rem;
  background: gray;
  border-radius: 999px;
}

/* 3D canvas panel */

#canvas-panel {
  width: 100%;
  flex: 1;
  position: relative;
  min-height: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#canvas-panel canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Leaflet map */

#leaflet-map-main {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Wind cube cells */

.wind-cube-cell {
  transition: opacity 0.2s ease;
}
.wind-cube-cell:hover {
  opacity: 1 !important;
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */

/* Mobile and Tablet Styles (768px and below) */
@media screen and (max-width: 768px) {
  /* Adjust app container size for mobile with bottom GUI panel */
  #app-container {
    width: 100vw;
    height: 50vh;
  }
}
