/* Custom Styles */
.card-header {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 8px 12px !important;
  border-bottom: 2px solid #000;
  background-color: #44607a57;
}

.card-header h4, 
.card-header .h4, 
.card-header span {
  font-size: 0.8rem !important;
  display: flex;
  align-items: center;
  color: #01070c;
}

.card-header .icon { margin-right: 12px !important; }

.sidenav, .navbar-vertical, #main_sidebar, nav.navbar { display: none !important; }

.main-content { margin-left: 0 !important; padding: 0 !important; }
.header { padding-top: 0.4rem !important; padding-bottom: 0.4rem !important; min-height: 60px !important; }
.container-fluid { padding-left: 8px !important; padding-right: 8px !important; }
.row {
  display: flex;
  margin-right: -15px;
  margin-left: -15px;
  flex-wrap: nowrap;
}
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
  color: #000000;
  font-weight: bold;
  background-color: #bcc6d2;
}
.col, [class*='col-'] { padding-left: 6px !important; padding-right: 6px !important; }

.card { margin-bottom: 8px !important; }
.card-body { padding: 10px 12px !important; }
.card-header { padding: 8px 12px !important; }
h3.text-primary, h3.text-info, h3.text-warning { margin-top: 6px !important; margin-bottom: 8px !important; font-size: 16px !important; }

.form-group { margin-bottom: 8px !important; }
.form-control { height: 34px !important; font-size: 13px !important; padding: 4px 10px !important; }
label { font-size: 12px !important; margin-bottom: 3px !important; }
hr { margin-top: 8px !important; margin-bottom: 8px !important; }

#custom-navbar {
  display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; 
  background: linear-gradient(87deg, #ffffff 0, #44607a57 100%); 
  min-height: 70px; width: 100%; box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11); 
  z-index: 1000; position: fixed; top: 0; left: 0; right: 0;
}
#custom-navbar .brand-title { color: #1f71c1; font-weight: 800; font-size: 1.2rem; letter-spacing: 2px; flex-shrink: 0; display: flex; align-items: center; }
#custom-navbar .tabs-wrapper { margin-left: auto; display: flex; align-items: center; gap: 10px; transition: all 0.3s ease-in-out; }
.nav-top-tab { color: #1d2c80 !important; font-weight: 600; background: azure; font-size: 13px; padding: 6px 14px; border-radius: 6px; cursor: pointer; transition: background 0.2s; text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-top-tab:hover { background: rgba(255,255,255,0.15) !important; color: black !important; }
.nav-top-tab.active-tab { color: black !important; background: lightcoral; box-shadow: 0 2px 8px rgba(0,0,0,0.15); font-weight: bold; }
.menu-toggle { display: none; font-size: 24px; cursor: pointer; background: none; border: none; color: #525f7f; }

body { padding-top: 52px !important; }
.leaflet-container { border-radius: 6px; }

.map-controls {
  display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: #f8f9fe; border-radius: 8px; border: 1px solid #e9ecef;
}
.map-controls label { font-weight: 600 !important; font-size: 12px !important; color: #525f7f; margin-bottom: 3px !important; white-space: nowrap; }
.map-controls .form-control { width: auto !important; }
.map-controls-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; padding-bottom: 2px; }

.custom-radio-margin, .custom-radio-margin .custom-radio-buttons { margin: 0 !important; padding: 0 !important; }
.custom-radio-margin .form-group { margin: 0 !important; padding: 0 !important; }
#display_type { margin-top: -8px !important; margin-bottom: 4px !important; padding: 0 !important; }
#display_type .shiny-options-group { margin: 0 !important; padding: 0 !important; }
#display_type-label { display: none !important; }
.radio-inline { margin-top: 0 !important; padding-top: 0 !important; }
.main-content .container-fluid { padding-right: 3px !important; padding-left: 3px !important; }

.card-body .shiny-echarts4r-output { width: 100% !important; }
.slider-animate-container { display: block !important; text-align: left; margin-top: 4px; }
.slider-animate-button { display: inline-block !important; visibility: visible !important; opacity: 1 !important; color: #f5365c; font-size: 0.85rem; cursor: pointer; text-decoration: none; }
.slider-animate-button:hover { color: #c0392b; text-decoration: none; }

@media (max-width: 992px) {
  .menu-toggle { display: block; }
  .tabs-wrapper { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: linear-gradient(87deg, #ffffff 0, #44607a57 100%); padding: 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); z-index: 999; gap: 5px; }
  .tabs-wrapper.menu-open { display: flex; }
  .nav-top-tab { width: 100%; color: #1d2c80 !important; text-align: left; }
  .nav-top-tab:hover { color: black !important; }
}

@media (max-width: 992px) {
  .menu-toggle { 
    display: block !important; 
  }
  
  /* Hide tabs by default on mobile */
  #custom-navbar .tabs-wrapper { 
    display: none !important; 
    flex-direction: column; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    background: #ffffff; /* Use a solid color to prevent transparent overlap */
    padding: 15px; 
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); 
    z-index: 999; 
    gap: 8px; 
  }
  
  /* Show tabs when toggle JS adds .menu-open */
  #custom-navbar .tabs-wrapper.menu-open { 
    display: flex !important; 
  }
  
  .nav-top-tab { 
    width: 100%; 
    color: #1d2c80 !important; 
    text-align: left; 
    justify-content: flex-start;
  }
}

/* .bootstrap-select>.dropdown-toggle {
    position: relative;
    width: 50%;
    height: 36px;
    text-align: right;
    white-space: nowrap;
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
} */