:root {
    --header-height: 66px;
    --primary-color: rgb(13, 110, 253);
    --slider-height: 44px;
}


.dataset-page-container {
    display: grid;
    grid-template-columns: 30% 70% !important;
}

.explorer-slider-container-absolute {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 30rem;
  z-index: 1000;
}

/* TODO: Change these classes to not include !important */

.explorer-chart {
  order: 4 !important;
  min-height: initial !important;
}

.other-data {
  order: 6 !important;
}

.explorer-legend {
  order: 5 !important;
}

.chartWrapper {
  min-height: fit-content !important;
}

#pointEvolution {
  order: 3 !important;
  min-height: fit-content;
}

.time-interval-container {
  .time-interval {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
  }
  .time-interval:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(var(--primary-color), 0.5);
  }
}

.explorer-actions-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  order: 100 !important;
  margin-top: 2rem;
}

.dataset-admin-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 1rem;
}

.dataset-admin-actions .explorer-action-btn {
  background: linear-gradient(90deg, rgba(130, 60, 200, 0.9) 0%, rgba(80, 30, 180, 0.9) 100%);
}

.dataset-admin-actions .explorer-action-btn:hover {
  background: linear-gradient(90deg, rgba(130, 60, 200, 1) 0%, rgba(80, 30, 180, 1) 100%);
  box-shadow: 0 0 8px rgba(80, 30, 180, 0.5);
}

#editDatasetBtn {
  background: transparent;
  border: 2px solid rgba(30, 150, 76, 0.9);
  color: rgba(30, 150, 76, 0.9);
  transition: all 0.2s ease-in-out;
}

#editDatasetBtn:hover {
  background: rgba(30, 150, 76, 0.1);
  border: 2px solid rgba(30, 150, 76, 1);
  color: rgba(30, 150, 76, 1);
  box-shadow: 0 0 8px rgba(30, 150, 76, 0.3);
}

#deleteDatasetBtn {
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.8) 0%, rgba(203, 36, 49, 0.8) 100%);
}

#deleteDatasetBtn:hover {
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.9) 0%, rgba(203, 36, 49, 0.9) 100%);
  box-shadow: 0 0 8px rgba(220, 53, 69, 0.5);
}

.explorer-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, rgba(30, 150, 76, 0.9) 0%, rgba(32, 113, 145, 0.9) 100%);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  text-align: left;
}

.explorer-action-btn:hover {
  background: linear-gradient(90deg, rgba(30, 150, 76, 1) 0%, rgba(32, 113, 145, 1) 100%);
  box-shadow: 0 0 8px rgba(32, 113, 145, 0.5);
  color: white;
  transform: translateY(-2px);
}
.explorer-action-btn .material-icons {
  font-size: 1.5rem;
}

.dte-explorer-header {
  background: #1e964c;
  background: linear-gradient(90deg,rgba(30, 150, 76, 1) 0%, rgba(32, 113, 145, 1) 84%);
  border-bottom: 1px solid #e0e0e0;
  height: var(--header-height);

  & .dte-explorer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
  }

  & .dte-explorer-logo-container {
    display: flex;
    align-items: center;
  }

  & .dte-explorer-logo {
    height: 40px;
    width: auto;
  }

  & .dte-explorer-title {
    font-size: 2.2rem;
    margin: 0 0 0 15px;
    font-weight: 700;
    color:white;
  }

  & .dte-explorer-title-accent {
    color: #98FF98;
  }

  & .dte-explorer-button {
    background-color: #62b761;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s;
  }

  & .dte-explorer-button:hover {
    background-color: #4f974e;
    color: white;
    box-shadow: 0 0 5px rgba(98, 183, 97, 0.5);
  }

  & .dte-explorer-button i {
    margin-left: 8px;
  }
}

.explorer-date-value {
  background-color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  width: fit-content;
}

.explorer-slider-container-compare {
  width: 100%;
  top: 2rem;
  display: none;

  .nav-buttons {
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    gap: 0px;
    height: var(--slider-height);
  }
  .sliderWrapper {
    height: 100%;
  }
  .fake-slider {
    height: 100%;
    .slider-mark {
      width: 2px;
      background-color: var(--primary-color);
    }
  }
  .material-icons {
    color: var(--primary-color);
  }

  .slider-indicative-mark {
      top: 90%;
      height: 10%;
  }

  .slider-indicative-label {
      top: 40%;
      transform: translate(-50%, 0);
  }

  .year {
    top:30%;
  }

  .new-year {
    height: 20%;
    top: 83%;
  }
}

.order-4 {
  order: 4;
}

.dataset-map {
  position: sticky;
  top: 2rem;
}

.dark-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  .nav-buttons {
    width: 30rem;
    background-color: rgba(0, 0, 0, 0.5);
  }
  .material-icons {
    color: white;
  }
  .year, .new-year, .slider-indicative-mark, .slider-indicative-label {
    color: white;
  }
  .explorer-slider {
    background-color: transparent;
  }
  .explorer-slider::-webkit-slider-thumb {
    background-color: var(--primary-color);
  }
  .explorer-slider::-moz-range-thumb {
    background-color: var(--primary-color);
  }
}

.select2-container .select2-selection--single {
  border-bottom: none !important;
  font-weight: 600;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  color: black !important;
  font-size: 1.25rem !important;
}

.explorer-slider {
  -webkit-appearance: none;
  border-radius: 5px;
  width: 100%;
  min-height: 100%;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;

}

.explorer-slider:hover {
  opacity: 1;
}

.explorer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0px;
  width: 25px;
  min-height: 100%;
  background: var(--primary-color);
  opacity: 0.5;
  cursor: pointer;
  transition: transform .2s ease;
}

.explorer-slider::-moz-range-thumb {
  border-radius: 0px;
  width: 25px;
  min-height: 100%;
  background: var(--primary-color);
  opacity: 0.5;
  cursor: pointer;
  transition: transform .2s ease;
}


@media(max-width: 900px) {
  .dataset-page-container {
      grid-template-columns: 100% !important;
      height: auto !important;
  }
  .height-100vh {
      height: auto !important;
      overflow: auto;
  }
  .dark-slider {
    .nav-buttons {
      width: 15rem;
    }
  }
  .time-interval-container {
    width: 100%;
  }

  .dte-explorer-header {

    & .dte-explorer-title {
      font-size: 1.5rem;
    }
    & .dte-explorer-button {
      i{
        margin-left: 0;
      }
    }
    & .dte-explorer-button-text {
      display: none;
    }
  }
  
  .explorer-action-btn {
    padding: 0.5rem 1rem;
  }
}

@media(max-width: 400px) {
  #interval-selector {
    flex-direction: column;
    gap: 0.5rem;
    .date-buttons {
      width: 100%;
      display: flex;
      justify-content: space-between;
    }
  }
  .dte-explorer-header {

    & .dte-explorer-title {
      font-size: 1rem;
    }
    & .dte-explorer-button {
      padding: 4px 8px;
    }
  }
  
  .explorer-action-btn {
    font-size: 0.9rem;
    
    .material-icons {
      font-size: 1.2rem;
    }
  }
}

@media(min-width: 901px) and (max-width: 1300px) {
  #interval-selector {
    flex-direction: column;
    gap: 0.5rem;
    .date-buttons {
      width: 100%;
      display: flex;
      justify-content: space-between;
    }
  }
}

