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

/* ================= ROOT ================= */
.filterBar {
  display: flex;
  // flex-direction: column;
  gap: 12px;
  width: 100%;

  @media (max-width: 768px) {
    flex-direction: column;
    padding: 1.5rem 1rem !important;
  }

  background: #ffffff;
  padding: 16px;
  border-radius: 14px;

  border: 1px solid #f0e9e4;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(94, 56, 23, 0.04);

  transition: all 0.2s ease;

  &:hover {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.05),
      0 8px 20px rgba(94, 56, 23, 0.06);
  }
}

/* ================= SEARCH ================= */
.search {
  width: 100%;

  > * {
    width: 100%;
  }
}

/* ================= CONTROLS ================= */
.controls {
  display: flex;
  // flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ================= FILTERS ================= */
.filters {
  display: flex;
  gap: 10px;
  // flex-wrap: wrap;

   @media (max-width: 768px) {
    flex-wrap: wrap;
  }

  select {
    appearance: none;

    padding: 10px 14px;
    border-radius: 10px;

    border: 1px solid #e6dcd2;
    background: #faf8f6;

    font-size: 14px;
    color: #1a1a1a;

    min-width: 150px;

    transition: all 0.2s ease;

    cursor: pointer;

    &:hover {
      border-color: #d6c2aa;
      background: #fff;
    }

    &:focus {
      outline: none;
      border-color: #7a4b20;
      background: #fff;
      box-shadow: 0 0 0 3px rgba(122, 75, 32, 0.08);
    }
  }
}

/* ================= ACTIONS ================= */
.actions {
  display: flex;
  gap: 8px;
}

/* ================= APPLY BUTTON ================= */
.applyBtn {
  background: linear-gradient(135deg, #5e3817, #7a4b20);
  color: #fff;

  border: none;
  padding: 10px 16px;

  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.25s ease;

  box-shadow: 0 6px 14px rgba(122, 75, 32, 0.2);

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(122, 75, 32, 0.28);
  }

  &:active {
    transform: scale(0.96);
  }
}

/* ================= CLEAR BUTTON ================= */
.clearBtn {
  background: #faf8f6;
  border: 1px solid #e6dcd2;

  padding: 10px 16px;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 500;

  color: #5e3817;

  cursor: pointer;

  transition: all 0.2s ease;

  &:hover {
    background: #f3ebe5;
    border-color: #d6c2aa;
  }

  &:active {
    transform: scale(0.96);
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

/* ================= TABLET ================= */
@media (max-width: 900px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filters {
    width: 100%;

    select {
      width: 100%;
    }
  }

  .actions {
    width: 100%;
    justify-content: space-between;

    button {
      flex: 1;
    }
  }
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {
  .actions {
    flex-direction: column;

    button {
      width: 100%;
    }
  }
}