/* ============================================================= */
/* NAYFINIX GLOBAL THEME CORE                                    */
/* Shared Design Tokens & Global Resets for all modes           */
/* ============================================================= */

:root {
  /* Dynamic Background Color - Switches between modes */
  --theme-bg: #0d1b2a;
  --theme-text: #f8f9fa;
  --theme-accent: #00d4ff;
  --theme-accent-glow: rgba(0, 212, 255, 0.4);
  
  /* Standard Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Transition Timing */
  --theme-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles applied to EVERY page */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Scrollbar Restoration (Dark Mode by default) */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
  background-clip: content-box;
}

/* Light Mode Scrollbar Overrides */
html.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

html.light-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Base Material Icon Fix */
.material-icons {
  vertical-align: middle;
}

/* ===== USER SEARCH RESULTS WRAPPING & EMAIL VISIBILITY ===== */
.user-result {
  min-height: unset !important;
  height: auto !important;
  padding: 12px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.user-result-info {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.user-result-details {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
}
.user-result-name {
  white-space: normal !important;
  word-break: break-all !important;
  word-wrap: break-word !important;
  overflow: visible !important;
  text-overflow: unset !important;
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin-bottom: 2px !important;
}
.user-result-email {
  display: block !important;
  white-space: normal !important;
  word-break: break-all !important;
  word-wrap: break-word !important;
  overflow: visible !important;
  text-overflow: unset !important;
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.6) !important;
  opacity: 0.85 !important;
  margin-top: 2px !important;
  line-height: 1.3 !important;
}
html.light-mode .user-result-email {
  color: rgba(0, 0, 0, 0.6) !important;
}

/* ===== SEARCH RESULTS VIEWPORT MIDDLE CUTOFF (50vh) & SCROLLING ===== */
#search-results {
  max-height: 50vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 30px !important;
}

/* Fix for desktop layout: Hide the mobile search close button */
@media (min-width: 769px) {
  #close-mobile-search {
    display: none !important;
  }
}
