@import url(/css/components/timeframe-toggle.css);
@import url(/css/components/etf-table.css);
@import url(/css/components/pagination.css);

.pagination {
  margin-inline: 0;
}

/*******************************
 Table
 ******************************/

.breadcrumbs .inner-wrapper {
  border-top: var(--border-width) solid rgb(var(--light-border-bold));
  padding-block: 3rem 2rem;
}

.etfs-all .inner-wrapper {
  padding-block-end: 8rem;
}

.etfs-all-table-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  white-space: nowrap;
}

.etfs-all-table-controls {
  display: flex;
  gap: 1rem;
}

@media (max-width: 49rem) {
  .etfs-all-table-header {
    flex-direction: column;
  }

  .etfs-all-table-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 41rem) {
  .etfs-all-table-controls {
    grid-template-columns: 1fr;
  }
}

/*******************************
 Search
 ******************************/

.search-funds-mock-input {
  background-color: rgb(var(--light-common-mineral));
  color: rgb(var(--light-border-bold));
  border-block-end-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  margin-block: 1.5rem;
  cursor: pointer;
}

.search-funds-mock-input .svg {
  width: 1.25rem;
  height: 1.25rem;
}

/*******************************
 Select
 ******************************/

.select-etf-products select {
  appearance: none;
  background-color: transparent;
  border: none;
  padding: 0.75em 2.5em 0.75em 0.75em;
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: inherit;
  cursor: inherit;
  line-height: inherit;
}

.select-etf-products {
  width: 100%;
  min-width: 15ch;
  max-width: 30ch;
  border-radius: var(--border-radius);
  border: 1px solid rgb(var(--light-border-default));
  padding: 0em;
  cursor: pointer;
  line-height: 1.1;
  display: grid;
  grid-template-areas: "select";
  align-items: center;
}

.select-etf-products::after {
  content: "";
  width: 0.8em;
  height: 0.5em;
  background-color: rgb(var(--light-text-primary));
  clip-path: polygon(100% 0%, 0 0%, 50% 100%);
  justify-self: end;
  margin-right:0.75em;
}

.select-etf-products select,
.select-etf-products::after {
  grid-area: select;
}


/*******************************
 Research Filters
 ******************************/

.research-filters {
  background-color: rgb(var(--light-common-citrine));
  border-block-end-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));

  height: calc(3.5rem + var(--border-width));

  overflow: hidden;
  display: flex;
}

.research-filters .inner-wrapper {
  background-color: rgb(var(--light-common-citrine));
  border: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block-end: 0;
}

.research-filter {
  flex-shrink: 0;
  user-select: none;
}

.research-filter .svg {
  width: 1.2rem;
  height: 1.2rem;
  display: inline;
}

.research-filter fieldset {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.research-filter__float {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 5);
  height: 100%;
}

.research-filter label {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  color: rgb(var(--light-text-link-default));
  text-align: center;
}

.research-filter input[type="radio"]:hover + label {
  color: rgb(var(--light-text-link-hover));
}

.research-filter input[type="radio"]:checked + label:hover {
  background-color: transparent;
}

.research-filter input[type="radio"] {
  appearance: none;
  background-color: transparent;
  margin: 0;
  cursor: pointer;
}

.research-filter-glider {
  border-block-end-width: 3px;
  border-color: rgb(var(--light-border-bold));
  color: rgb(var(--light-text-link-default));
  transition: 250ms ease-out;
}

.research-filter input[type="radio"]:nth-of-type(1) {
  transform: translateX(0%);
}

.research-filter input[type="radio"]:nth-of-type(2) {
  transform: translateX(100%);
}

.research-filter input[type="radio"]:nth-of-type(3) {
  transform: translateX(200%);
}

.research-filter input[type="radio"]:nth-of-type(4) {
  transform: translateX(300%);
}

.research-filter input[type="radio"]:nth-of-type(5) {
  transform: translateX(400%);
}

.research-filter input[type="radio"]:nth-of-type(1):checked ~ .research-filter-glider {
  transform: translateX(0%);
}

.research-filter input[type="radio"]:nth-of-type(2):checked ~ .research-filter-glider {
  transform: translateX(100%);
}

.research-filter input[type="radio"]:nth-of-type(3):checked ~ .research-filter-glider {
  transform: translateX(200%);
}

.research-filter input[type="radio"]:nth-of-type(4):checked ~ .research-filter-glider {
  transform: translateX(300%);
}

.research-filter input[type="radio"]:nth-of-type(5):checked ~ .research-filter-glider {
  transform: translateX(400%);
}

@media (max-width: 46rem) {
  .research-filters {
    height: calc(5.5rem + var(--border-width));
  }

  .research-filter fieldset {
    grid-template-columns: repeat(7, 1fr);
  }

  .research-filter label:last-of-type:nth-of-type(3n-1) {
    grid-column-end: -2;
  }
  .research-filter label:nth-last-of-type(2):nth-of-type(3n + 1) {
    grid-column-end: 4;
  }
  .research-filter label:last-of-type:nth-of-type(3n - 2) {
    grid-column-end: 5;
  }

  .research-filter__float {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% / 3);
    height: 50%;
  }

  .research-filter input[type="radio"]:nth-of-type(1) {
    transform: translateX(0%);
  }

  .research-filter input[type="radio"]:nth-of-type(2) {
    transform: translateX(100%);
  }

  .research-filter input[type="radio"]:nth-of-type(3) {
    transform: translateX(200%);
  }

  .research-filter input[type="radio"]:nth-of-type(4) {
    transform: translateX(50%) translateY(100%);
  }

  .research-filter input[type="radio"]:nth-of-type(5) {
    transform: translateX(150%) translateY(100%);
  }
  
  .research-filter input[type="radio"]:nth-of-type(5) {
    transform: translateX(250%) translateY(100%);
  }

  .research-filter input[type="radio"]:nth-of-type(1):checked ~ .research-filter-glider {
    transform: translateX(0%);
  }

  .research-filter input[type="radio"]:nth-of-type(2):checked ~ .research-filter-glider {
    transform: translateX(100%);
  }

  .research-filter input[type="radio"]:nth-of-type(3):checked ~ .research-filter-glider {
    transform: translateX(200%);
  }

  .research-filter input[type="radio"]:nth-of-type(4):checked ~ .research-filter-glider {
    transform: translateX(50%) translateY(100%);
  }

  .research-filter input[type="radio"]:nth-of-type(5):checked ~ .research-filter-glider {
    transform: translateX(150%) translateY(100%);
  }
  .research-filter input[type="radio"]:nth-of-type(6):checked ~ .research-filter-glider {
    transform: translateX(250%) translateY(100%);
  }
}

@media (max-width: 27rem) {
  .research-filter label {
    font-size: 0.75rem;
  }
}
