/* ===== Filter Modal Overlay ===== */
.filter-modal {
  position: fixed;
  inset: 0;
  display: none; /* Hidden by default */
  align-items: flex-start; /* ensures it starts near the top */
  justify-content: center; /* centers horizontally */
  padding-top: 8vh; /* vertical offset from top */
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  animation: fadeIn 0.25s ease;
}

.filter-modal.show {
  display: flex; /* 👈 keeps it centered */
}

/* ===== Modal Box ===== */
.filter-modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  border-radius: 22px;
  padding: 2rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease;
  transition: background 0.3s, color 0.3s;
}

/* ===== THEME ADAPTIVE COLORS ===== */
@media (prefers-color-scheme: light) {
  .filter-modal-content {
    background: rgba(255, 255, 255, 0.6);
    color: #222;
  }

  .filter-modal-content input,
  .filter-modal-content select {
    background: rgba(255, 255, 255, 0.8);
    color: #222;
  }

  .clear-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #222;
  }

  .clear-btn:hover {
    background: rgba(0, 0, 0, 0.15);
  }
}

@media (prefers-color-scheme: dark) {
  .filter-modal-content {
    background: rgba(30, 30, 30, 0.5);
    color: #fff;
  }

  .filter-modal-content input,
  .filter-modal-content select {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }

  .clear-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }
}

/* ===== Header ===== */
.filter-modal-content h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== Form Labels ===== */
.filter-modal-content label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ===== Inputs & Select ===== */
.filter-modal-content input,
.filter-modal-content select {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 0.9rem;
  appearance: none;
}

/* Dropdown styling */
.filter-modal-content select {
  cursor: pointer;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0.15));
}
.filter-modal-content select option {
  background-color: #222;
  color: #fff;
  padding: 0.5rem;
}

/* ===== Buttons ===== */
.filter-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.filter-actions .btn {
  flex: 1;
  padding: 0.7rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apply-btn {
  background: var(--color-primary);
  color: #fff;
}

.apply-btn:hover {
  background: var(--color-primary);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Glass Close Button (Perfectly Centered) ===== */
.close-modal-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: inherit;
  font-size: 1.7rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  opacity: 0.85;
  line-height: 1;
  padding: 0;
}

/* Center the × properly */
.close-modal-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px); /* fine-tune vertical centering */
}

/* Hover effect */
.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Light & dark theme adjustments */
@media (prefers-color-scheme: light) {
  .close-modal-btn {
    background: rgba(0, 0, 0, 0.08);
    color: #222;
  }

  .close-modal-btn:hover {
    background: rgba(0, 0, 0, 0.15);
  }
}

@media (prefers-color-scheme: dark) {
  .close-modal-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }

  .close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }
}


