/* 1. Define the TTF font */
@font-face {
  font-family: 'Henry Sans';
  src: url('../fonts/HenrySans-Regular.ttf') format('truetype');
font-display: swap;
  font-weight: normal;
  font-style: normal;
}
/* Apply to the entire document */
html, body {
  font-family: 'Henry Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Ensure headings inherit it properly or handle bold weights */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Henry Sans', sans-serif;
  font-weight: 700; /* Uses the bold variant */
}
/* Blocky Tab Navbar Design */
.navbar-default {
  background-color: #fff;
  border: none;
  margin-bottom: 0;
  padding-top: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.navbar-brand {
  padding: 15px 15px;
  font-size: 18px;
  font-weight: bold;
  color: #001A9C !important;
  display: flex;
  align-items: center;
}
.nav-tabs-custom {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-tabs-custom > li > a {
  display: block;
  padding: 24px 20px;
  color: #555;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
}
.nav-tabs-custom > li > a:hover {
  background-color: #f0f4ff;
  color: #001A9C;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}
.nav-tabs-custom > li.active > a {
  background-color: #001A9C !important;
  color: #fff !important;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}
/* Layout Header Gradient */
.traffic-header-bg {
  background: linear-gradient(180deg, #001A9C 0%, #001A9C 25%, #f4f7f6 65%);
  padding: 40px 0 60px 0;
}
.traffic-title {
  font-size: 44px;
  color: #ffffff;
  font-weight: bold;
  margin-bottom: 5px;
}
.traffic-subtitle {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 2px;
  font-weight: bold;
}
.traffic-sub-text {
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 40px;
  font-weight: bold;
}
/* Replicated Legend Graphic Box from Image 3_2.jpg */
.legend-container-box {
  background: #fff;
  border: 5px solid #001A9C;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  margin-bottom: 30px;
  margin-left: 80px;
  width: 230px;
}
.legend-header-title {
  background-color: #001A9C;
  color: #fff;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: bold;
  border: 3px solid #ffffff;
  border-radius: 24px 24px 0 0;
}
.legend-list-wrapper {
  padding: 4px 0; /* Pulled top and bottom tighter */
}
/* Interactive Clickable Legend Items */
.legend-row-item {
  display: flex;
  align-items: center;
  padding: 10px 20px; /* Reduced padding to make items much closer together */
  font-size: 13px;
  font-weight: bold;
  color: #333;
  transition: color 0.2s ease-in-out;
  margin-bottom: -7px;
}
/* Lighten text color on hover ONLY—no background changes */
.legend-row-item:hover {
  color: #4a6eff;
}
/* Fixed structural grid sizing for exact geometric icons */
.legend-icon-box img {
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 10px;
  box-sizing: border-box;
}
/* Toggle Switch UI Component Style */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  margin-right: 10px;
  flex-shrink: 0;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 20px;
}
.slider-toggle:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.switch-toggle input:checked + .slider-toggle {
  background-color: #001A9C;
}
.switch-toggle input:checked + .slider-toggle:before {
  transform: translateX(14px);
}
/* Feedback Section Placeholder box styling */
.feedback-container-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 5px solid #001A9C;
  border-radius: 24px;
  padding: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  margin-bottom: 30px;
  margin-left: 80px;
  width: 230px;
}
.qr-placeholder-graphic {
  width: 80px;
  height: 80px;
  border: 3px solid #001A9C;
  border-radius: 16px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  padding: 8px;
}
.feedback-msg-text h5 {
  font-weight: bold;
  color: #001A9C;
  margin: 0 0 4px 0;
  font-size: 15px;
}
.feedback-msg-text p {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.3;
  padding: 10px 0 10px 0
}
/* Outer Schematic Area Graphic Wrapper */
.map-wrapper-layout {
  /* background-color: #fff;*/
  border-radius: 24px;
  padding: 15px;
  /*box-shadow: 0 6px 20px rgba(0,0,0,0.05);*/
  min-height: 620px;
  position: relative;
  margin-top: -100px;
}
/* Outer frame container that handles bounds hiding */
.map-display-placeholder {
  position: relative;
  width: 100%;
  height: 660px;
  /*background-color: #b8c5e5;*/
  border-radius: 16px;
  /*border: 1px dashed #bdc3c7; */
  overflow: hidden;
  cursor: grab;
  touch-action: none; /* Prevents default browser pinning/scrolling gestures inside the viewport */
}
.map-display-placeholder:active {
  cursor: grabbing;
}
/* NEW: Wrapper targeting zoom transformations to keep all layers synced perfectly */
.map-zoom-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  transition: transform 0.05s ease-out;
  will-change: transform;
}
/* Graphic Transparent Layer Elements */
.map-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain; /* Changed to contain globally to prevent asset distortion across resolutions */
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
/* NEW: Zoom controls overlay UI layout block */
.zoom-controls-overlay {
  position: absolute;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 20;
}
.zoom-btn {
  width: 40px;
  height: 40px;
  background-color: #fff;
  color: #001A9C;
  border: 2px solid #001A9C;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s;
  user-select: none;
}
.zoom-btn:hover {
  background-color: #f0f4ff;
}
/* CSS Loading Spinner Design Overlay */
.map-loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.spinner-circle {
  width: 50px;
  height: 50px;
  border: 5px solid #000000;
  border-top: 5px solid #001A9C;
  border-radius: 50%;
  animation: spin-kf 1s linear infinite;
}
@keyframes spin-kf {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@media (max-width: 767px) {
  .navbar-container {
    flex-direction: column;
    align-items: center;
  }
  .navbar-brand {
    padding: 12px 15px 6px 15px;
  }
  .nav-tabs-custom > li > a {
    padding: 12px 12px;
    font-size: 11px;
  }
  .map-display-placeholder {
    height: 300px;
  }
  .map-wrapper-layout {
    margin-top: 50px !important;
    min-height: 420px;
  }
  .zoom-controls-overlay {
    display: flex;
    top: -1px;
    bottom: 15px;
    right: 15px;
  } /* Enabled layout blocks on mobile viewports */
}
/* widen default container*/
.container {
  width: 100%;
  max-width: 1350px; /* Increase this from 1200px or 1140px */
  margin: 0 auto; /* Keeps the container centered */
}
.navbar-flex-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.mobile-burger-btn {
  display: none !important;
}
@media (max-width: 767px) {
  .navbar-default {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    z-index: 9999 !important;
  }
  body {
    padding-top: 60px !important;
  }
  .navbar-flex-container {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 5px 15px !important;
  }
  .mobile-burger-btn {
    display: block !important;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    outline: none;
  }
  .mobile-burger-btn .line {
    display: block;
    width: 22px;
    height: 3px;
    background-color: #001A9C;
    margin: 4px 0;
    border-radius: 1px;
  }
  .menu-wrapper {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    border-top: 1px solid #eee !important;
    padding: 0 !important;
  }
  .menu-wrapper.open {
    display: block !important;
  }
  .nav-tabs-custom {
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
  }
  .nav-tabs-custom > li {
    width: 100% !important;
    display: block !important;
  }
  .nav-tabs-custom > li > a {
    padding: 15px 20px !important;
    font-size: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .nav-tabs-custom > li > a:hover, .nav-tabs-custom > li > a:focus {
    background-color: #001A9C !important;
    color: #fff !important;
    border-radius: 0px;
  }
  .nav-tabs-custom > li.active > a {
    border-radius: 0 !important;
  }
  .legend-container-box {
    margin-left: 0;
  }
  .legend-container-box {
    margin-left: 0;
    width: 100%;
  }
  .feedback-container-box {
    margin-left: 0;
    width: 100%;
  }
}