body { font-family: 'Open Sans', Arial, sans-serif; background: #fff; }
.selector-row { margin-bottom: 20px; }
.custom-dropdown { min-width: 180px; }
.selector-control { 
  display: flex; 
  flex-direction: column; 
  justify-content: flex-end;
}
.selector-control .form-label { 
  margin-bottom: 0.5rem; 
  height: 1.5rem;
  display: flex;
  align-items: flex-end;
}
.selector-control .form-select,
.selector-control .form-range {
  height: 38px;
}
.nav-tabs { padding-top: 10px;}

#vega-histogram {
  min-width: 200px;
  min-height: 300px;
  width: 100%;
}

/* SPINKIT */

/*
The MIT License (MIT)

Copyright (c) 2015-2020 Tobias Ahlin

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

.spinner {
  margin: 100px auto;
  width: 50px;
  height: 40px;
  text-align: center;
  font-size: 10px;
}

.plot-spinner {
  margin: 20px auto;
  width: 50px;
  height: 40px;
  text-align: center;
  font-size: 10px;
}

.spinner > div,
.plot-spinner > div {
  background-color: #333;
  height: 100%;
  width: 6px;
  display: inline-block;

  -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
  animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.spinner .rect2 {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
}

.spinner .rect3 {
  -webkit-animation-delay: -1.0s;
  animation-delay: -1.0s;
}

.spinner .rect4 {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}

.spinner .rect5 {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
}

@-webkit-keyframes sk-stretchdelay {
  0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
  20% { -webkit-transform: scaleY(1.0) }
}

@keyframes sk-stretchdelay {
  0%, 40%, 100% {
    transform: scaleY(0.4);
    -webkit-transform: scaleY(0.4);
  }  20% {
    transform: scaleY(1.0);
    -webkit-transform: scaleY(1.0);
  }
}

#histogram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.histogram-item {
  position: relative;
  border: 1px solid #f2f2f2;
  border-radius: 4px;
  padding: 10px;
  background: #fff;
  min-width: 0; /* Allow grid item to shrink below content size */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.histogram-item.highlighted {
  border: 2px solid #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.histogram-plot {
  width: 100%;
  overflow: hidden;
}

.histogram-spinner {
  width: 50px;
  height: 40px;
  margin: 20px auto;
  text-align: center;
  font-size: 10px;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.histogram-spinner > div {
  background-color: #333;
  height: 100%;
  width: 6px;
  display: inline-block;
  -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
  animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.histogram-spinner .rect2 {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
}

.histogram-spinner .rect3 {
  -webkit-animation-delay: -1.0s;
  animation-delay: -1.0s;
}

.histogram-spinner .rect4 {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}

.histogram-spinner .rect5 {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
}

.histogram-no-data {
  width: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selection-stats-box {
  padding: 8px 12px;
  width: 100%;
}

.stats-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.stat-item {
  font-size: 18px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.histogram-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
  word-wrap: break-word;
  color: #333;
}

.form-range {
  width: 100%;
  margin-top: 5px;
}

.form-check {
  margin-top: 10px;
}

.form-check-label {
  font-size: 14px;
  cursor: pointer;
}

