/* custom.css*/

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  color: #fff; /* text color */
}
/* Onest Regular */
@font-face {
  font-family: 'Onest';
  src: url('./fonts/Onest/OnestRegular1602-hint.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}


body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  font-family: 'Onest', sans-serif;
}
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.sidebar {
  width: 300px;
  background-color: #f8f9fa;
  padding: 1rem;
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-size: 0.85rem; /* adjust as needed, 1rem is default */
}
.sidebar h5 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #41728c;
  font-size: 1rem; /* slightly smaller than default */
}
.sidebar label {
  margin-right: 10px;
  font-size: 0.85rem;
}
.sidebar .btn-group-horizontal button {
  font-size: 0.85rem;
}

.sidebar select,
.sidebar input {
  font-size: 0.85rem;
}

.sidebar .list-group-item {
  font-size: 0.85rem;
}

.content {
  flex: 1;
  overflow-y: auto;
}
.graph-container {
  width: 100%;
  height: 400px;
  padding-left: 1rem;
}
.btn-group-vertical button {
  margin-bottom: 0.5rem;
}
#username {
  font-weight: 500;
  color: #fff;
}

.navbar-custom {
  background-color: #5b8da6;
  min-height: 50px;
  font-size: 14px;
  color: #fff;
  padding-top: 0;
  padding-bottom: 0;
}
.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  color: #fff;
}

#username {
  font-weight: 500;
  color: #fff;
}

/* Custom hamburger menu styling */
.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}
.navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Fix logo alignment */
.navbar-brand {
  display: flex;
  align-items: center;
  margin: 0;
  height: 50px;
  flex-shrink: 0;     /* NEW */
  position: relative; /* NEW */
  z-index: 1100;      /* NEW */
}


/* Ensure proper navbar height and alignment */
.navbar-custom .container-fluid {
  align-items: center;
  height: 75px;
  padding-left: 0;   /* NEW remove left padding */
}

/* Mobile menu styling */
.navbar-collapse {
  background-color: #5b8da6;
}

/* Only apply collapse behavior on mobile screens */
@media (max-width: 767.98px) {
  /* Force the collapsed menu to be hidden by default on mobile */
  .navbar-collapse:not(.show) {
    display: none !important;
  }

  /* Force the collapsed menu to be visible when shown on mobile */
  .navbar-collapse.show {
    display: block !important;
  }

  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #5b8da6;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  /* Stack menu items vertically on mobile */
  .navbar-nav {
    flex-direction: column;
    align-items: flex-start !important;  /* NEW - forces left alignment */
    margin: 0 !important;                /* NEW - removes default margins */
    width: 100%;                         /* NEW - full width */
  }

  .navbar-nav .nav-item {
    margin: 0.25rem 0;
    width: 100%;                         /* NEW - full width for each item */
  }
}
.logo-box {
  background-color: #f8f9fa;  /* light gray (can switch to #fff for pure white) */
  padding: 4px 8px;           /* spacing around logos */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* If you want the brand area to visually stand out more */
.navbar-brand.logo-box {
  height: auto; /* override fixed 50px if needed */
}


/* On desktop, always show the navbar content */
@media (min-width: 768px) {
  .navbar-collapse {
    display: flex !important;
  }
}

@media (max-width: 1200px) {
  /* Hide all .navbar-brand elements except the first two */
  .navbar-brand:not(:nth-child(-n+2)) {
    display: none;
  }
}

@media (max-width: 1200px) {
  .navbar-custom .container-fluid {
    /* Prevent wrapping and maintain a single line */
    flex-wrap: nowrap;

    /* Ensure a consistent, smaller height for the mobile navbar */

  }

  /* Make sure the navbar brand is not taking up unnecessary space */
  .navbar-brand {
    height: 40px; /* Adjust height for a more compact look */
  }
}

.sidebar-buttons {
  margin-top: auto; /* pushes only the buttons to the bottom */
}

/* Pulsing highlight for refresh button when changes pending */
#refreshBtn.has-changes {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    background-color: rgba(150, 200, 220, 0.2);
    box-shadow: 0 0 0 0 rgba(91, 141, 166, 0.7);
    color: rgba(0, 0, 0, 0.8);
  }
  50% {
    background-color: rgba(40, 70, 90, 0.5);
    box-shadow: 0 0 0 15px rgba(91, 141, 166, 0);
    color: rgba(255, 255, 255, 0.9);
  }
}

/* Highlight active toolbox items */
.echarts-toolbox-item-active {
  background-color: rgba(91, 141, 166, 0.2) !important;
  border-radius: 2px;
}

/* Style for zoom mode indicator */
.echarts-zoom-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background-color: #5b8da6;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.main-content {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content.hidden {
  display: none;
}

#refreshBtn {
  background-color: #5b8da6;
  border-color: #5b8da6;
  color: #fff;
}

#refreshBtn:hover,
#refreshBtn:focus {
  background-color: #41728c;
  border-color: #41728c;
  color: #fff;
}

/* Cursor pointer for calendar date inputs */
#startDate,
#endDate {
  cursor: pointer;
}

#startDate:hover,
#endDate:hover {
  cursor: pointer;
}

/* ================= Flatpickr Calendar Styling ================= */
/* Custom Flatpickr styling to match index page calendar */
.flatpickr-calendar {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #dee2e6;
}

.flatpickr-months {
  background: #5b8da6;
  border-radius: 8px 8px 0 0;
}

.flatpickr-month {
  color: white;
  font-weight: normal !important;
}

.flatpickr-current-month {
  color: white;
  font-weight: normal !important;
}

.flatpickr-monthDropdown-months {
  background: #5b8da6;
  color: white;
  font-weight: normal !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #5b8da6;
  color: white;
  font-weight: normal !important;
}

.flatpickr-current-month .numInputWrapper input {
  color: white;
  font-weight: normal !important;
}

.flatpickr-weekday {
  color: white;
  font-weight: 600;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: white !important;
  fill: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  vertical-align: middle !important;
}

/* Day cells styling */
.flatpickr-day {
  border-radius: 4px;
  transition: all 0.2s ease;
}

.flatpickr-day:hover {
  background: #e8f4f8;
  border-color: #5b8da6;
}

.flatpickr-day.selected {
  background: #5b8da6 !important;
  border-color: #5b8da6 !important;
  color: white !important;
  font-weight: bold;
}

.flatpickr-day.today {
  border-color: #41728c;
  font-weight: 600;
}