.filter-container {
  background-color: #d4e0ee;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (min-width: 768px) {
  .filter-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .gear-container {
    margin-top: -10px;
    align-self: flex-start;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: 500;
  color: #333;
}

.filter-group input,
.filter-group select {
  box-sizing: border-box;
  height: 40px;
  line-height: 1.4;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  background-color: #eef3f9;
  transition: background-color 0.2s ease-in-out;
}

.filter-group input:hover,
.filter-group select:hover {
  background-color: #dde7f3;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: #0d2c54;
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 44, 84, 0.15);
}

.filter-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%230d2c54" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px 16px;
  padding-right: 30px;
}

/* Filter Modal Styling */
#filterModal.modal,
#filterModalRent.modal {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  position: fixed;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0;
}

#filterModal.modal.is-open,
#filterModalRent.modal.is-open {
  display: flex;
}

#filterModal .modal-content,
#filterModalRent .modal-content {
  overflow-x: hidden;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 24px;
  max-width: 540px;
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#filterModal .modal-content h2,
#filterModalRent .modal-content h2 {
  margin-bottom: 8px;
  color: #0b2e59;
  font-size: 1.4rem;
  text-align: center;
}

#filterModal .modal-content .close,
#filterModalRent .modal-content .close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #999;
  z-index: 1;
  background: transparent;
  border: 0;
}

#filterModal .modal-content .close:hover,
#filterModalRent .modal-content .close:hover {
  color: #0b2e59;
}

#filterModal .filter-bar,
#filterModalRent .filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

#filterModal .modal-action-row,
#filterModalRent .modal-action-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  #filterModal .filter-bar,
  #filterModalRent .filter-bar {
    grid-template-columns: 1fr;
  }
}

#filterModal .modal-clear-btn,
#filterModalRent .modal-clear-btn {
  background-color: #bbb;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
}

#filterModal .modal-apply-btn,
#filterModalRent .modal-apply-btn {
  background-color: #0b2e59;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
}

#filterModal .modal-clear-btn:hover,
#filterModalRent .modal-clear-btn:hover,
#filterModal .modal-apply-btn:hover,
#filterModalRent .modal-apply-btn:hover {
  opacity: 0.9;
}

body[data-dashboard-theme="executive-navy"] #filterModal .modal-content,
body[data-dashboard-theme="executive-navy"] #filterModalRent .modal-content {
  background: #0f2437;
  border: 1px solid rgba(203, 220, 236, 0.38);
  color: #f7fbff;
}

body[data-dashboard-theme="executive-navy"] #filterModal .modal-content h2,
body[data-dashboard-theme="executive-navy"] #filterModalRent .modal-content h2,
body[data-dashboard-theme="executive-navy"] #filterModal .filter-group label,
body[data-dashboard-theme="executive-navy"] #filterModalRent .filter-group label {
  color: #f4f9ff;
}

body[data-dashboard-theme="executive-navy"] #filterModal .filter-bar,
body[data-dashboard-theme="executive-navy"] #filterModalRent .filter-bar {
  background: rgba(6, 20, 33, 0.62);
  border-color: rgba(203, 220, 236, 0.3);
}

body[data-dashboard-theme="executive-navy"] #filterModal .filter-group input,
body[data-dashboard-theme="executive-navy"] #filterModal .filter-group select,
body[data-dashboard-theme="executive-navy"] #filterModalRent .filter-group input,
body[data-dashboard-theme="executive-navy"] #filterModalRent .filter-group select {
  background-color: #061421;
  border-color: rgba(203, 220, 236, 0.42);
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] #filterModal .filter-group input::placeholder,
body[data-dashboard-theme="executive-navy"] #filterModalRent .filter-group input::placeholder {
  color: #b9cbe0;
  opacity: 1;
}

body[data-dashboard-theme="executive-navy"] #filterModal .filter-group select option,
body[data-dashboard-theme="executive-navy"] #filterModalRent .filter-group select option {
  background: #061421;
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] #filterModal .modal-clear-btn,
body[data-dashboard-theme="executive-navy"] #filterModalRent .modal-clear-btn {
  background-color: #153753;
  border: 1px solid rgba(203, 220, 236, 0.36);
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] #filterModal .modal-apply-btn,
body[data-dashboard-theme="executive-navy"] #filterModalRent .modal-apply-btn {
  background-color: #2fc7a1;
  color: #03101c;
}

@media (max-width: 500px) {
  #filterModal.modal,
  #filterModalRent.modal {
    display: none;
    justify-content: center;
    align-items: center;
    width: 90vw;
    height: 100vh;
    padding: 16px;
  }

  #filterModal.modal.is-open,
  #filterModalRent.modal.is-open {
    display: flex;
  }

  #filterModal .modal-content,
  #filterModalRent .modal-content {
    width: 80%;
    height: auto;
    padding: 16px;
    border-radius: 8px;
    gap: 12px;
  }

  #filterModal .modal-apply-btn,
  #filterModalRent .modal-apply-btn,
  #filterModal .modal-clear-btn,
  #filterModalRent .modal-clear-btn {
    flex: 1;
    font-size: 1rem;
    padding: 12px;
  }

  #filterModal .filter-bar,
  #filterModalRent .filter-bar {
    gap: 12px;
  }
}
