@use "../../../styles/abstracts/variables" as *;
@use "../../../styles/abstracts/mixins" as *;

/* ================= TOKENS ================= */
$border-light: rgba(0, 0, 0, 0.06);
$text-muted: #6b6b6b;
$text-dark: #1a1a1a;

$primary: #5e3817;
$primary-2: #7a4b20;
$primary-soft: rgba(122, 75, 32, 0.08);

/* ================= PAGE ================= */
.page {
  @include dashPageComponent;

  height: 100%;
  padding: 0;

  display: flex;
  flex-direction: column;
  background: $bg-soft;
  border: 1px solid $border;

  @media (max-width: 1000px) {
    margin-top: 5rem;
  }
}

/* ================= CONTENT ================= */
.content {
  padding: 1rem 2.5rem;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.2rem !important;

  @media (max-width: 1000px) {
    padding: 1.5rem;
  }
}

/* ================= FILTER WRAPPER ================= */
.filterWrapper {
  width: 100%;
}

/* ================= FILTER FIELDS ================= */
.filterFields {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;

  select {
    padding: 0.55rem 0.75rem;
    border-radius: 10px;

    border: 1px solid $border-light;
    background: #fff;

    font-size: 0.8rem;
    color: $text-dark;

    cursor: pointer;

    transition: all 0.2s ease;

    &:focus {
      outline: none;
      border-color: $primary-2;
      box-shadow: 0 0 0 3px $primary-soft;
    }

    &:hover {
      border-color: rgba(122, 75, 32, 0.25);
    }
  }
}

/* ================= GRID ================= */
.grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;

  @media (max-width: 768px) {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
  }

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

/* ================= LOADING GRID ================= */
.loadingGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

/* ================= EMPTY STATE ================= */
.fullWidthEmpty {
  width: 100%;
  padding: 2rem 0;
}

/* ================= PAGINATION ================= */
.pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* ================= SCROLL OFFSET ================= */
.page {
  scroll-margin-top: 100px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .content {
    gap: 1rem;
  }

  .grid {
    gap: 1rem;
  }

  .filterFields {
    width: 100%;

    select {
      flex: 1;
      width: 100%;
    }
  }
}