/* PeerGem Gradient Background */
:root {
  /* Corner colors */
  --bg-corner: #1a0935;
  
  /* Main vertical gradient colors with specific breakpoints */
  --bg-top: #0e0038;
  --bg-middle: #0e0038;
  --bg-half-bottom: #4c322c;
  --bg-bottom: #976d1d;
}

/* Main background with adjusted gradient transition */
body {
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  
  /* Base background color */
  background-color: var(--bg-top);
  color: #fff !important;
}

/* Primary dome/half-circle gradient */
body::before {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh; /* Full viewport height */
  /* Create half-circle dome effect from bottom center */
  background: radial-gradient(
    ellipse at 50% 100%,
    var(--bg-bottom) 0%,      /* Center bottom is gold */
    var(--bg-half-bottom) 40%, /* Transitional color */
    var(--bg-middle) 70%,      /* Blend back to dark purple */
    transparent 100%           /* Fade to base color */
  );
  z-index: -1;
  pointer-events: none;
}

/* Corner gradients to blend with the dome */
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh; /* Full viewport height */
  background: 
    /* Bottom left corner gradient that meets the dome */
    radial-gradient(
      circle at 0% 100%,
      var(--bg-corner) 0%,
      var(--bg-corner) 20%,
      transparent 50%
    ),
    /* Bottom right corner gradient that meets the dome */
    radial-gradient(
      circle at 100% 100%,
      var(--bg-corner) 0%,
      var(--bg-corner) 20%,
      transparent 50%
    );
  z-index: -2;
  pointer-events: none;
}

/* Additional subtle vertical gradient overlay */
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    var(--bg-top) 0%,
    var(--bg-top) 40%,
    transparent 70%
  );
  z-index: -3;
  pointer-events: none;
}

/* Marketplace Styles */
:root {
  --primary-color: #f0b90b;
  --primary-hover: #e1ad0b;
  --text-light: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-color: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(15, 15, 15, 0.6);
  --card-bg-hover: rgba(25, 25, 25, 0.8);
  --dropdown-bg: rgba(30, 30, 30, 0.95);
  --overlay-bg: rgba(0, 0, 0, 0.5);
  --filter-tag-bg: rgba(40, 40, 45, 0.9);
}

/* Layout */
#marketplace-content {
  padding: 0 1rem 3rem;
  color: var(--text-light);
  flex: 1 0 auto;
}

/* Hero Section */
.marketplace-hero {
  text-align: center;
  padding: 3rem 1rem 0;
  margin-bottom: 0.5rem;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.marketplace-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #ffc107;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
}

.marketplace-hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Search Form */
.search-container {
  max-width: 900px;
  margin: 0 auto;
  margin-bottom: 0.75rem !important;
}

.search-form {
  display: flex;
  background: rgba(20, 20, 20, 0.7);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  box-shadow: 0 4px 25px rgba(240, 185, 11, 0.15);
  overflow: hidden;
  width: 100%;
}

.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 400;
  color: white;
  outline: none;
  min-width: 0;
}

.search-form input::placeholder {
  color: var(--text-muted);
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #fff;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  gap: 8px;
}

/* Use the app's gradient button styling */
.search-button.send-button-gradient {
  background: linear-gradient(to bottom right, #ff5757 0%, #8c52ff 90%);
}

.search-button.send-button-gradient:hover {
  background: linear-gradient(to bottom right, #ff7070 0%, #9e6dff 90%);
}

/* Filter Bar */
.filter-bar {
  position: relative;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  width: 100%;
  z-index: auto;
  overflow: visible;
}

.filters-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 0;
  margin-top: 0;
  z-index: auto;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.filter-icon {
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.filter-icon svg {
  width: 20px;
  height: 20px;
}

.filter-button {
  display: flex;
  align-items: center;
  background: rgba(40, 40, 45, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  gap: 6px;
  color: var(--text-muted);
}

.filter-button:hover {
  background: rgba(50, 50, 55, 0.8);
  border-color: var(--primary-color);
  color: var(--text-light);
}

.filter-button.active {
  border-color: var(--primary-color);
  background: rgba(50, 50, 55, 0.9);
  color: var(--text-light);
}

.filter-button svg {
  width: 16px;
  height: 16px;
}

.flex-spacer {
  flex-grow: 1;
}

.clear-filters-button {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  color: #3b82f6;
  font-size: 1rem;
  cursor: pointer;
  gap: 5px;
  padding: 0.5rem 0.75rem;
}

.clear-filters-button:hover {
  color: #60a5fa;
}

/* Active filters styling */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 32px;
}

.filter-tag {
  display: flex;
  align-items: center;
  background: rgba(40, 40, 45, 0.9);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  gap: 6px;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-tag svg {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.filter-tag svg:hover {
  opacity: 1;
}

/* Date options */
.date-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Text sizes and colors */
.text-xs {
  font-size: 0.75rem;
}

.text-gray-400 {
  color: #9ca3af;
}

.text-blue-400 {
  color: #60a5fa;
}

.hover\:text-blue-300:hover {
  color: #93c5fd;
}

/* Spacing utilities */
.mb-2 {
  margin-bottom: 0.5rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

/* Border */
.border-t {
  border-top-width: 1px;
}

.border-gray-700 {
  border-color: #374151;
}

/* Price Range Styles */
.currency-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.currency-button {
  background: rgba(40, 40, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.currency-button.selected {
  background: var(--primary-color);
  color: black;
  border-color: var(--primary-color);
}

.price-range {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.price-range label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.price-value {
  color: var(--primary-color);
  font-weight: 500;
}

input[type=range] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}

/* Loading Indicator */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Results Title and Insight */
.marketplace-results h2,
.marketplace-results h2 span {
  text-align: left;
}

.marketplace-results h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.search-insight {
  background: rgba(40, 40, 45, 0.7);
  border-left: 3px solid var(--primary-color);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* No Results */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
}

.no-results svg {
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.no-results h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

/* Domain Grid - Updated to match app styling */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 2rem;
}

@media (max-width: 992px) {
  .domain-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Domain Card - Use Tailwind classes directly */
.domain-card {
  background: rgba(20, 20, 25, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.domain-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Fix domain name styling */
.domain-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffc107;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

/* Fix domain description styling */
.domain-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.5rem 0 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fix domain price styling */
.domain-card .text-green-400 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2ecc71;
}

/* Style the category badge */
.domain-card .text-xs.bg-gray-700 {
  font-size: 0.75rem;
  background: rgba(60, 60, 70, 0.6);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
}

/* Style the "View details" link - fix white background issue */
.domain-card button {
  background: transparent;  /* Ensure completely transparent background */
  border: none;
  color: #3b82f6;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 0;  /* Remove any padding that might show background */
}

.domain-card button:hover {
  color: #60a5fa;
  background: transparent;  /* Keep background transparent on hover */
}

/* Adjust spacing between elements */
.domain-card .flex.justify-between.items-center.mt-4 {
  margin-top: 1rem;
}

/* Add these utility classes in case they're not available from Tailwind */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.text-yellow-400 { color: #facc15; }
.text-green-400 { color: #4ade80; }
.text-sm { font-size: 0.875rem; }
.text-gray-400 { color: #9ca3af; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.text-xs { font-size: 0.75rem; }
.bg-gray-700 { background-color: #374151; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.rounded { border-radius: 0.25rem; }
.text-blue-400 { color: #60a5fa; }
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Load More */
.load-more {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.load-more-button {
  background: transparent;
  border: none;
  color: #60a5fa;  /* text-blue-400 */
  font-size: 1rem;
  font-weight: normal;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.2s;
}

.load-more-button:hover {
  color: #93c5fd;  /* text-blue-300 */
  background: transparent;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .marketplace-hero h1 {
    font-size: 1.8rem;
  }
  
  .marketplace-hero .subtitle {
    font-size: 1rem;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-form input {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .search-button {
    width: 100%;
    border-radius: 0;
  }
  
  .filter-container {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .dropdown-content {
    max-width: 100%;
  }
  
  .currency-options {
    flex-wrap: wrap;
  }
  
  .domain-grid {
    grid-template-columns: 1fr;
  }
  
  .marketplace-results h2 {
    font-size: 1.5rem;
  }
  
  .filter-button {
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .filter-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .filter-button svg {
    width: 14px;
    height: 14px;
  }
  
  .clear-filters-button {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
  }
  
  .search-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 0.5rem;
  }
  
  .filters-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 0.5rem;
  }

  .domain-grid {
    width: 100%;
    padding: 0;
  }

  .container {
    padding: 0.5rem;
  }

  .marketplace-results {
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .marketplace-hero h1 {
    font-size: 1.5rem;
  }
  
  .marketplace-hero {
    padding: 1rem 0 1rem;
  }
  
  .domain-card {
    padding: 1rem;
    margin: 0;
  }
  
  .domain-card h3 {
    font-size: 1.2rem;
  }
  
  .domain-price {
    font-size: 1.1rem;
  }
  
  .domain-card p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
  
  .domain-category {
    font-size: 0.6875rem;
  }
  
  .domain-link {
    font-size: 0.8125rem;
  }
  
  .load-more-button {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }
  
  .filter-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    transform: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
  }
  
  .dropdown-content {
    width: 90%;
    max-width: 350px;
    max-height: 80vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
  }
  
  .dropdown-body {
    max-height: 60vh;
    overflow-y: auto;
  }
  
  /* Make dropdown header more compact on mobile */
  .dropdown-header {
    padding: 10px;
    justify-content: center;
  }
  
  /* Remove extra space between header and divider */
  .dropdown-header h4 {
    margin-bottom: 0;
  }
  
  /* Make filter options more compact */
  .filter-option {
    padding: 8px 10px;
  }
  
  /* More compact checkbox spacing */
  .filter-option input[type="checkbox"],
  .filter-option input[type="radio"] {
    margin-right: 6px;
  }

  .domain-grid {
    gap: 1rem;
    width: 100%;
  }
}

/* Modified mobile dropdown styling */
@media (max-width: 480px) {
  .mobile-dropdown-overlay {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
  }
  
  .dropdown-content {
    position: relative;
    background: #1e1e1e;
    width: 90%;
    max-width: 350px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(240, 185, 11, 0.7);
  }
  
  .dropdown-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0 10px;
    background-color: #1e1e1e;
  }
  
  /* Increase tap target size */
  .filter-option {
    padding: 10px 12px;
  }
  
  /* Adjust close button positioning */
  .dropdown-header .close-dropdown {
    top: 8px;     /* Reduces margin from the top */
    right: 8px;   /* Reduces margin from the right side */
    padding: 8px; /* Increases the clickable area */
  }
}

/* Fix clear search button positioning */
.clear-search-button {
  float: none;
  display: block;
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: 0.875rem;
  color: #60a5fa;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.search-results-title {
  clear: both;
  margin-top: 8px;
}

/* Featured Domains Section */
.featured-domains {
  margin-top: -1rem;
  margin-bottom: 3rem;
  text-align: center;
}

.featured-domains h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.featured-domains p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}

/* Cache Status Indicator */
.cache-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cache-status .cached {
  color: #10b981;
}

.cache-status .live {
  color: #ef4444;
}

.search-results-title {
  text-align: left !important;
}

.marketplace-results {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Footer Positioning */
html, body {
  height: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#marketplace-content {
  flex: 1 0 auto;
}

#footer-component {
  flex-shrink: 0;
  margin-top: 2rem;
}

/* Ensure footer stays at the bottom on smaller screens */
@media (max-height: 800px) {
  .container {
    min-height: 100vh;
  }
}

/* Additional classes to replace inline styles */
.hero-content-full {
  max-width: none;
  width: 100%;
  margin-bottom: 0;
  padding-bottom: 0;
}

.marketplace-heading {
  margin-bottom: 0.2rem;
  font-size: 1.8rem;
}

/* Fix search container width for desktop */
.search-container-centered {
  max-width: none;
  width: 800px; /* Return to fixed width for desktop */
  margin: 0 auto;
  margin-bottom: 0.75rem;
}

/* Better responsive adjustments */
@media (max-width: 992px) {
  .search-container-centered {
    width: 90%; /* Slightly reduce width on medium screens */
  }
}

/* Keep proper spacing on mobile */
@media (max-width: 768px) {
  .search-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 0.5rem;
  }
  
  .filters-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 0.5rem;
  }

  .domain-grid {
    width: 100%;
    padding: 0;
  }
}

/* Further optimize for smaller screens */
@media (max-width: 480px) {
  .search-container-centered {
    width: 100%; /* Full width on smallest screens */
    padding: 0 0.5rem;
  }
}

.search-form-full {
  width: 100%;
}

.search-input-flex {
  min-width: 0;
  flex: 1;
}

.filter-bar-no-margin {
  margin-top: 0;
  padding-top: 0;
}

.filters-container-no-margin {
  padding-top: 0;
  margin-top: 0;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

.flex-visible {
  display: flex;
}

.text-left {
  text-align: left;
}

.loading-subtext {
  display: block;
  margin-top: 8px;
}

.no-results-spacing {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.no-results-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.no-results-heading {
  margin-top: 0;
  margin-bottom: 4px;
}

.no-results-text {
  margin-top: 0;
}

.view-all-button {
  margin-top: 1rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #60a5fa;
}

/* Update the Clear search button to remove white background */
.clear-search-button {
  float: right;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.clear-search-button:hover {
  color: #93c5fd;
}

.clear-search-icon {
  margin-right: 4px;
}

/* Remove the debug button from DOM */
.debug-button {
  display: none !important;
}

/* Make domain grid use full width of the results container */
.domain-grid {
  width: 100%;
}

/* Style enhancements */
.filter-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.filter-tag {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Add custom container for filter bar to ensure proper positioning context */
.filter-bar {
  position: relative;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  width: 100%;
  /* Remove any z-index that might interfere */
  z-index: auto;
}

/* Ensure parent containers don't have any CSS that might interfere */
.filters-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 0;
  margin-top: 0;
  z-index: auto;
}

/* Make sure section doesn't have overflow: hidden */
section.filter-bar-no-margin {
  overflow: visible;
}

/* Fix the clear all link to match app style */
.clear-filter-button {
  font-size: 0.75rem;
  color: #60a5fa;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-weight: normal;
}

/* Style the clear option container */
.clear-option {
  padding: 8px 12px 12px 12px;
}

/* Fix border for clear option */
.clear-option .pt-2 {
  padding-top: 8px;
  border-top: 1px solid #374151;
}

/* Filter Dropdown Styling */
.filter-dropdown {
  position: fixed;
  z-index: 1000;
  display: none;
  background: #1e1e1e;
  border: 1px solid rgba(240, 185, 11, 0.7);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  min-width: 250px;
  max-width: 280px;
}

.filter-dropdown.active {
  display: block;
}

/* Fix close button visibility - hide on desktop, only show on mobile */
.dropdown-header .close-dropdown {
  display: none !important; /* Hidden by default on desktop */
}

/* Only show close button on mobile */
@media (max-width: 480px) {
  .dropdown-header .close-dropdown {
    display: block !important; /* Show on mobile */
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    transition: color 0.2s;
  }
}

.dropdown-header h4 {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0;
  padding: 12px 12px 8px 12px;
  font-weight: normal;
}

.dropdown-body {
  max-height: 250px;
  overflow-y: auto;
  padding: 0;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: white;
  border-radius: 4px;
  margin: 2px 0;
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  margin-right: 8px;
}

.clear-option {
  padding: 0 12px 12px 12px;
}

.clear-option .pt-2 {
  padding-top: 8px;
  border-top: 1px solid #374151;
}

.clear-filter-button {
  font-size: 0.75rem;
  color: #60a5fa;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-weight: normal;
}

.clear-filter-button:hover {
  color: #93c5fd;
}

/* 1. Fix the dropdown header styling to add proper margin to the "Select categories" text */
.dropdown-header .mb-2.text-xs.text-gray-400 {
  margin-top: 12px;
  padding: 0 12px;
  color: #9ca3af;
  font-weight: normal;
  margin-bottom: 8px;
}

/* 2. Fix the filter options styling to reduce left margin for checkboxes */
.filter-option {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: white;
  border-radius: 4px;
  margin: 2px 0;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  margin-right: 8px;
}

/* 3. Fix the "Clear all categories" button styling to remove white background */
#category-clear-option,
.pt-2.mt-2.border-t.border-gray-700 {
  margin-top: 8px;
  padding: 8px 12px;
  border-top: 1px solid #374151;
  background: transparent;
}

#category-clear-option button,
.pt-2.mt-2.border-t.border-gray-700 button {
  font-size: 0.75rem;
  color: #60a5fa;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-weight: normal;
}

/* Fix the dropdown background and content */
.dropdown-content {
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
}

/* Ensure the dropdown body has proper padding */
.dropdown-body {
  max-height: 250px;
  overflow-y: auto;
  padding: 0;
}

/* Price filter dropdown - compact currency buttons */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 12px 12px 12px;
}

.currency-button {
  background: rgba(40, 40, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.currency-button.selected {
  background: #3b82f6; /* Blue instead of yellow for better visibility */
  color: white;
  border-color: #3b82f6;
}

.currency-button:hover:not(.selected) {
  background: rgba(60, 60, 65, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Price range slider styling */
.price-range-container {
  margin-top: 12px;
}

.price-slider-group {
  margin-bottom: 12px;
}

.price-slider-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.price-slider-label .label {
  color: #9ca3af;
}

.price-slider-label .value {
  color: #60a5fa;
}

/* Updated currency grid with margins */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 12px 12px 12px; /* Add horizontal margin to prevent touching the edges */
}

/* Make currency buttons smaller with less padding */
.currency-button {
  background: rgba(40, 40, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  padding: 0.3rem 0.4rem; /* Reduced padding */
  font-size: 0.75rem; /* Smaller font size */
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

/* Style for the currency placeholder text */
#currency-placeholder {
  text-align: center;
  padding: 10px 12px;
  margin: 8px;
  color: #9ca3af;
  font-size: 0.875rem;
  background-color: rgba(30, 30, 30, 0.7); /* Match dropdown background */
  border-radius: 4px;
}

/* Add proper margin to price range controls */
#price-range-controls {
  margin: 0 12px;
}

/* Ensure range inputs don't overflow their container */
input[type=range] {
  width: calc(100% - 4px);
  margin: 0 2px;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

/* Better style the price slider group and label */
.price-slider-group {
  margin-bottom: 12px;
  padding: 0 4px;
}

/* Add margin to the clear price option */
#price-clear-option {
  margin: 0 4px;
  padding-top: 8px;
}

/* Mobile dropdown close button styling */
@media (max-width: 480px) {
  .dropdown-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .dropdown-header .close-dropdown {
    display: block !important; /* Override the desktop hidden style */
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
  }
  
  .dropdown-header .close-dropdown:hover {
    color: white;
  }
  
  /* Add a mobile title to all dropdowns */
  .dropdown-header h4 {
    width: 100%;
    text-align: center;
    font-size: 1rem !important;
    color: white !important;
    margin: 0 auto !important;
    padding: 0 !important;
    font-weight: 500 !important;
  }
  
  /* Also ensure the dropdown content is styled properly */
  .dropdown-content {
    position: relative;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    width: 90%;
    max-width: 350px;
  }
  
  /* Make the dropdown body scrollable but with a max height */
  .dropdown-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0 10px;
  }
  
  /* For mobile, use a fullscreen overlay */
  .mobile-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
}

@media (max-width: 480px) {
  /* Remove extra top margin before "Select categories" text */
  .dropdown-header h4 {
    margin-top: 0;
    padding-top: 0;
  }
  
  /* Add margin for close button */
  .dropdown-header .close-dropdown {
    margin-right: 5px;
    padding: 8px;
  }
  
  /* Make dropdown content more compact with less unused space */
  .dropdown-content {
    width: 75%;
    max-width: 300px;
  }
  
  /* Keep the dropdown body narrow */
  .dropdown-body {
    max-width: 100%;
    padding: 0;
  }
  
  /* Constrain the width of filter options */
  .filter-option {
    width: auto;
    max-width: 100%;
    padding: 8px 10px;
    box-sizing: border-box;
  }
  
  /* Make the labels use only space they need */
  .filter-option label {
    font-size: 0.875rem;
    max-width: calc(100% - 24px); /* Account for checkbox width */
  }
  
  /* Target the specific dropdown */
  #category-options,
  #extension-options,
  #date-options,
  #price-options {
    width: 100%;
    max-width: 100%;
  }
  
  /* Adjust dropdown header for narrower size */
  .dropdown-header {
    padding: 8px 12px;
    width: auto;
  }
}

/* Date range filter specific styles */
#date-dropdown .dropdown-header h4 {
  font-size: 0.75rem !important;
  color: #9ca3af !important;
  text-align: left !important;
  font-weight: normal !important;
  padding-left: 12px !important;
  margin-top: 8px !important;
}

/* Override any centered styles */
#date-dropdown .dropdown-header {
  justify-content: flex-start !important;
}

/* Update to ensure date options have consistent padding with category options */
#date-options {
  padding: 0 !important; /* Remove the forced padding */
}

/* Ensure date option radio buttons align with category checkboxes */
#date-options .filter-option {
  padding: 6px 12px; /* Match the standard filter-option padding */
}

/* Price dropdown specific styles */
@media (max-width: 480px) {
  #price-dropdown .dropdown-header h4 {
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    text-align: left !important;
    font-weight: normal !important;
    padding-left: 12px !important;
    margin-top: 8px !important;
  }
  
  /* Override any centered styles */
  #price-dropdown .dropdown-header {
    justify-content: flex-start !important;
  }
}

/* Extension dropdown specific styles */
@media (max-width: 480px) {
  #extension-dropdown .dropdown-header h4 {
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    text-align: left !important;
    font-weight: normal !important;
    padding-left: 12px !important;
    margin-top: 8px !important;
  }
  
  /* Override any centered styles */
  #extension-dropdown .dropdown-header {
    justify-content: flex-start !important;
  }
}

/* Center the filter row on mobile */
@media (max-width: 480px) {
  .filter-row {
    justify-content: center;
    margin: 0 auto;
    max-width: 95%;
  }
  
  /* Hide the spacer on mobile to prevent pushing elements off-center */
  .flex-spacer {
    display: none;
  }
  
  /* Make clear filters button appear below filters instead of inline */
  .clear-filters-button {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }
}