/* Change color of cluster markers on leaflet map */
/* https://www.mapsmarker.com/kb/user-guide/how-to-change-the-color-of-marker-clusters/ */

.marker-cluster-small {
  color: #FFFFFF !important;
	background-color: rgba(34, 34, 34, 0.6) !important;
}

.marker-cluster-small div {
  color: #FFFFFF !important;
	background-color: rgba(34, 34, 34, 0.6) !important;
}

.marker-cluster-medium {
  color: #FFFFFF !important;
	background-color: rgba(34, 34, 34, 0.6) !important;
}

.marker-cluster-medium div {
  color: #FFFFFF !important;
	background-color: rgba(34, 34, 34, 0.6) !important;
}

.marker-cluster-large {
  color: #FFFFFF !important;
	background-color: rgba(34, 34, 34, 0.6) !important;
}

.marker-cluster-large div {
  color: #FFFFFF !important;
	background-color: rgba(34, 34, 34, 0.6) !important;
}

/*
  Widgets
*/

.filter__circle-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
}

.filter__text {
  font-size: 14px;
}

/* Selectize improvements */
.selectize-dropdown {
  max-width: 100%;
  width: 100% !important;
  position: absolute !important;
  overflow: visible !important;
  max-height: none !important;
  z-index: 1000 !important;
}

.selectize-dropdown-content {
  max-height: 300px;
  overflow-y: auto !important;
}

.selectize-input {
  max-width: 100%;
  font-size: 0.95rem;
  position: relative;
}

/* Style for the collapsible checkbox groups */
.collapsible-awesome-checkbox {
  margin-bottom: 15px;
}

/* Ensure collapsible elements show/hide properly */
.collapse {
  display: none;
  transition: height 0.25s ease;
}

.collapse.in,
.collapse.show {  /* Support both Bootstrap 3 and 4/5 */
  display: block !important;
  transition: height 0.25s ease;
}

.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  transition: height 0.25s ease !important;
}

/* Additional style to ensure the collapsible area has appropriate spacing */
[id$="_collapsible"] {
  margin-top: 5px;
  margin-bottom: 10px;
  overflow: visible !important;
  transition: all 0.25s ease;
}

/* Improve checkbox transitions */
.checkbox {
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform-origin: top left;
}

/* Make the button more prominent */
[id$="_btn"].action-button {
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 500;
  color: #0275d8;
  border: none;
  background: transparent;
  outline: none;
  padding: 6px 0;
  display: inline-block;
  width: auto;
}

[id$="_btn"].action-button:hover {
  color: #014c8c;
  text-decoration: underline;
}

[id$="_btn"].action-button:focus {
  outline: none;
  box-shadow: none;
}

/* Smoother icon transitions */
[id$="_btn"] .fa {
  transition: transform 0.25s ease;
  display: inline-block;
  width: 14px;
  text-align: center;
}

/* Style for the sidebar filter panel */
.sidebar-content {
  padding: 15px;
}

/* Make sure selectize inputs are properly sized */
.selectize-input {
  min-height: 34px;
  max-height: none;
  line-height: 22px;
}

/* Ensure checkbox group buttons are properly aligned */
.btn-group-vertical {
  width: 100%;
}

/* Style for the zoom button */
#zoom_to_pts {
  margin-top: 10px;
  margin-bottom: 20px;
}

/* Ensure proper spacing between filter components */
.form-group {
  margin-bottom: 15px;
}

/* Make sure the map container fills available space */
.leaflet-container {
  height: 100%;
  width: 100%;
}

/* Style for the filter panel title */
.sidebar-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 15px;
}


/* Dashboard styles for bslib */

/* Make value boxes more readable */
.value-box {
  margin-bottom: 15px !important;
}

.value-box .value-box-title {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}

.value-box .value-box-value {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

/* Improve card appearance */
.card {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  margin-bottom: 20px !important;
  border: none !important;
  transition: all 0.3s ease !important;
  overflow: visible !important;
}

.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
  font-weight: 600 !important;
  background-color: #f8f9fa !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Ensure plots have enough space */
.plotly, .tmap-viewer {
  width: 100% !important;
  min-height: 300px !important;
}

/* Dashboard tab container */
#dashboard_collision_category {
  margin-top: 20px !important;
  overflow-y: auto !important;
}

/* Make the dashboard tab content scrollable */
.tab-content {
  overflow-y: auto !important;
}

/* Improve tab appearance */
.nav-tabs .nav-link.active {
  font-weight: 600 !important;
  border-top: 3px solid #0d0d0d !important;
}

.nav-tabs .nav-link:hover {
  border-top: 3px solid rgba(13, 13, 13, 0.3) !important;
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
  .value-box .value-box-value {
    font-size: 1.5rem !important;
  }

  .value-box .value-box-title {
    font-size: 1rem !important;
  }

  /* Adjust layout for mobile */
  .layout-column {
    width: 100% !important;
    margin-bottom: 15px !important;
  }

  /* Make cards full width on mobile */
  .card {
    width: 100% !important;
  }

  /* Adjust plot heights for mobile */
  .plotly, .tmap-viewer {
    height: 250px !important;
  }
}

/* Ensure the dashboard page is scrollable */
#tab_dashboard {
  overflow-y: auto !important;
  height: calc(100vh - 60px) !important; /* Adjust for navbar height */
  padding-bottom: 30px !important;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth !important;
}

/* Ensure the main content area is scrollable */
.page-content {
  overflow-y: auto !important;
}

/* Dashboard styles for bslib */

/* Filter section styles */
.filter-section-container {
  margin-bottom: 20px !important;
  position: relative;
  z-index: 100 !important;
}

.filter-section-header {
  font-weight: 600 !important;
  font-size: 1.1rem;
}

.filter-component {
  background-color: #fff;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.filter-component:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Make sure selectize dropdowns appear above other elements */
.selectize-dropdown {
  max-width: 100%;
  width: 100% !important;
  position: absolute !important;
  overflow: visible !important;
  max-height: none !important;
  z-index: 1000 !important;
}

