/**
 * Custom Select Dropdown Styles - Premium Glassmorphism Edition
 * Matches landing page card aesthetic with backdrop blur and refined borders
 */

/* Base select styling with glassmorphism */
select {
  /* Glassmorphism background */
  background-color: rgba(23, 23, 23, 0.4) !important; /* neutral-900/40 */
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;

  /* Premium border */
  border: 1px solid rgba(255, 255, 255, 0.1) !important; /* white/10 */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -2px rgba(0, 0, 0, 0.2) !important;

  /* Text */
  color: #f1f5f9 !important; /* slate-100 */

  /* Custom dropdown arrow icon (SVG) */
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27rgba(255,255,255,0.5)%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e') !important;
  background-repeat: no-repeat !important;
  background-position: right 0.7rem center !important;
  background-size: 1.2rem !important;

  /* Smooth transitions */
  transition: all 0.2s ease !important;
}

/* Hover state for select */
select:hover {
  border-color: rgba(255, 255, 255, 0.15) !important; /* white/15 */
  background-color: rgba(23, 23, 23, 0.5) !important; /* neutral-900/50 */
}

/* Focus state for select */
select:focus {
  border-color: rgba(249, 115, 22, 0.4) !important; /* orange-500/40 */
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.4),
    0 0 0 3px rgba(249, 115, 22, 0.1),
    0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
  background-color: rgba(23, 23, 23, 0.6) !important; /* neutral-900/60 */
  outline: none !important;
}

/* Select options - Dark background with subtle glassmorphism */
select option {
  background-color: rgba(15, 15, 15, 0.95) !important; /* Very dark with slight transparency */
  color: #f1f5f9 !important; /* slate-100 */
  padding: 12px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
}

/* Hover state for options (works in Chrome/Edge) */
select option:hover {
  background-color: rgba(39, 39, 42, 0.95) !important; /* neutral-800/95 */
  color: #ffffff !important;
  background-image: linear-gradient(
    90deg,
    rgba(249, 115, 22, 0.05) 0%,
    transparent 100%
  ) !important;
}

/* Selected/Checked option */
select option:checked {
  background: linear-gradient(
    135deg,
    rgba(249, 115, 22, 0.2) 0%,
    rgba(249, 115, 22, 0.1) 100%
  ) !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  position: relative !important;
}

/* Disabled option styling */
select option:disabled {
  color: #64748b !important; /* slate-500 */
  background-color: rgba(15, 15, 15, 0.8) !important;
  opacity: 0.5 !important;
  font-style: italic !important;
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
  select {
    color-scheme: dark;
    background-image: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.05)
    ) !important;
  }

  select option {
    background-color: #0f0f0f;
    color: #f1f5f9;
  }

  select option:checked {
    background-color: rgba(249, 115, 22, 0.2);
    color: #ffffff;
  }
}

/* Webkit/Chrome/Safari specific enhancements */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select {
    color-scheme: dark;
  }

  /* Add subtle gradient overlay for depth */
  select::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.02),
      transparent
    );
    pointer-events: none;
    border-radius: inherit;
  }
}

/* Focus state for checked/hovered options */
select:focus option:checked {
  background: linear-gradient(
    135deg,
    rgba(249, 115, 22, 0.25) 0%,
    rgba(249, 115, 22, 0.15) 100%
  ) !important;
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Custom scrollbar for select dropdown (Webkit only) */
select::-webkit-scrollbar {
  width: 10px;
}

select::-webkit-scrollbar-track {
  background: rgba(15, 15, 15, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

select::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    rgba(249, 115, 22, 0.3),
    rgba(249, 115, 22, 0.2)
  );
  border-radius: 5px;
  border: 2px solid rgba(15, 15, 15, 0.95);
}

select::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    rgba(249, 115, 22, 0.5),
    rgba(249, 115, 22, 0.3)
  );
}

/* Add subtle inner glow on focus */
select:focus::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at center,
    rgba(249, 115, 22, 0.05),
    transparent 70%
  );
  pointer-events: none;
}
