/* --- Choices.js dropdown (match #custom-date + .time-range-select light theme) --- */
/* --- Force font for Choices.js (select + dropdown) --- */
.choices,
.choices__inner,
.choices__list,
.choices__item {
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif !important;
  font-size: 0.875rem !important;
  color: #6c757d !important;
}

.choices.time-range-choices {
  display: inline-block;
  vertical-align: middle;
}

.choices__inner {
  background-color: #fff !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0 !important;
  color: #6c757d !important;
  box-shadow: none !important;
  cursor: pointer;
  width: 120px;
  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;
  padding: 0 6px !important;
  display: flex !important;
}

.choices__list--dropdown {
  background-color: #fff !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
}

.choices__list--dropdown .choices__item {
  color: #6c757d !important;
  font-size: 1rem;
}

.choices__list--dropdown .choices__item--selectable:hover {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

.choices__inner:focus,
.choices__inner.is-focused {
  border-color: #ced4da !important;
  outline: none !important;
  box-shadow: none !important;
}

/* remove default arrow if you want */
.choices__list--single .choices__item::after {
  display: none !important;
}

/* align Choices with custom-date and reset-now-btn */
#custom-date,
.choices.time-range-choices .choices__inner,
#reset-now-btn {
  height: calc(1.5em + 0.5rem + 2px);
  vertical-align: middle;
  margin: 0 !important;
}

#custom-date,
.choices.time-range-choices {
  display: inline-block;
  vertical-align: middle;
}

.choices.is-disabled .choices__inner {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================================
 * 🧭 Time Controls Section (Range / Date / Aggregation / I/O mode / Now)
 * ========================================================================== */

.time-controls {
  display: flex;
  vertical-align: middle;
  gap: 8px;
  padding-bottom: 8px;
}

.tc-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tc-label {
  font-size: 0.78rem;
  color: #6c757d;
  user-select: none;
  white-space: nowrap;
}

.tc-label .material-icons {
  transform: translateY(2px); /* lekko obniża ikonę, żeby siedziała równo z tekstem */
}

.tc-info {
  color: #6c757d;
  user-select: none;
  white-space: nowrap;
  font-size: 12px !important;
}

.tc-info:hover {
  color: #495057;
}

/* Responsive layout for time controls */
@media (max-width: 992px) {
  .time-controls {
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 8px;
  }

  .tc-item {
    flex: 1 1 45%;
  }

  .tc-item.align-end {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .tc-item {
    flex: 1 1 100%;
  }
}
