@import "reset.css";
@import "default.css";
@import "header.css";
@import "footer.css";
@import "results.css";

.presentation {
  padding: 2% 16%;

  @media (max-width: 700px) {
    padding-top: 10%;
    padding-inline: 10%;
  }

  h1 {
    font-size: clamp(1.5rem, calc(0.1rem + 0.4vw), 2.5rem);
    font-weight: 900;
  }
}

/* Seção dos filtros */
.filters {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;

  @media (max-width: 700px) {
    gap: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
    font-weight: 800;

    @media (max-width: 700px) {
      font-size: 1.3rem;
    }
  }

  input:not([type="checkbox"]) {
    border: 1.5px solid oklch(0.922 0 0);
    border-radius: 0.4rem;
    padding: 0.5rem 0.6rem;
    min-height: 2.5rem;

    &:focus,
    :focus-within,
    :focus-visible {
      border-color: black;
      outline: 0;
    }
  }
}

.filters-advanced {
  margin-top: 1.5rem;
}

.filters-advanced-toggle {
  border: 1.5px solid oklch(0.922 0 0) !important;
  border-radius: 0.6rem;
  display: flex;
  font-weight: 600;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  margin-top: 2rem;
  cursor: pointer;
  transition: border-color 0.2s;

  &:hover {
    border-color: rgba(0, 0, 0, 0.384) !important;
  }

  .upward {
    rotate: 180deg;
    transition: rotate 0.3s ease-in-out;
  }
  .downward {
    rotate: 0deg;
    transition: rotate 0.3s ease-in-out;
  }
}

#max_votes {
  margin-top: 1.75rem;
  width: 100%;

  @media (max-width: 1200px) {
    margin-top: 0;
    flex-direction: column;
  }
}

#parties {
  max-width: 10%;
}

.select2-container .select2-search--inline .select2-search__field {
  margin-left: 10px;
}

.select2-container--default .select2-selection--multiple {
  border: 1.5px solid oklch(0.922 0 0);
  border-radius: 0.4rem;
  cursor: text;
  position: relative;
  min-height: 2.5rem;
}

.select2-container--disabled.select2-container--focus
  .select2-selection--multiple {
  border: 1.5px solid #eee;
}

.filters-basic {
  display: flex;
  justify-content: space-between;

  @media screen and (max-width: 1200px) {
    flex-direction: column;
    gap: 1rem;
  }

  .filter {
    flex-basis: 49%;
  }
}

.filters-advanced {
  display: grid;
  grid-template-columns: minmax(auto, 1fr) minmax(auto, 1fr);
  gap: 1.5rem 2%;

  @media screen and (max-width: 1200px) {
    grid-template-columns: 1fr;
  }
}

.filter {
  display: flex;
  flex-direction: column;

  > label {
    font-weight: 700;
    font-size: 1.15rem;
  }
}

input[type="checkbox"] ~ label {
  font-weight: 500;
  font-size: 1rem;
}

.filters-btns {
  display: flex;
  gap: 1rem;
}

.filter-btn {
  padding: 0.75rem 1.25rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  border-radius: 0.5rem;

  @media (max-width: 700px) {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  i {
    margin-right: 0.75rem;
  }
}

.filter-btn--primary {
  border: 2px solid color(srgb -0.165998 0.651302 0.241993);
  background-color: color(srgb -0.165998 0.651302 0.241993);
  color: oklch(0.985 0 0);

  &:hover {
    background-color: color(srgb -0.165998 0.55 0.241993);
    border-color: color(srgb -0.165998 0.55 0.241993);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
}

.filter-btn--secondary {
  border: 2px solid oklch(0.922 0 0);

  &:hover {
    background-color: oklch(0.985 0 0);
    border-color: oklch(0.5 0 0);
    opacity: 0.9;
  }
}
