/* Navbar Base Styles */
.navbar-app-bar {
  background-color: #ffffff !important;
  color: black !important;
  box-shadow: 2px 2px 5px #e9ecef;
  padding: 0;
}

.navbar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px !important;
  min-height: 64px !important;
  gap: 24px;
}

/* Responsive Toolbar Layouts */
.navbar-toolbar.mobile {
  padding: 8px 12px !important;
  min-height: 60px !important;
}

.navbar-toolbar.tablet {
  padding: 0px 16px !important;
  gap: 12px;
}

/* Left Section */
.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-icon {
  font-size: 24px;
  color: #333;
}

.logo-link {
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.navbar-logo.mobile {
  height: 36px;
}

/* Location Display - All Screens */
.navbar-location-container {
  flex-shrink: 0;
}

.location-display {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
  min-width: 140px;
  max-width: 200px;
}

.location-display:hover {
  background-color: #f5f5f5;
}

.location-display.mobile {
  min-width: auto;
  max-width: none;
  padding: 8px;
  justify-content: center;
}

.location-display.tablet {
  min-width: 120px;
  max-width: 200px;
}

.location-icon {
  font-size: 16px;
  margin-right: 8px;
  flex-shrink: 0;
}

.location-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.location-city {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-state {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-dropdown {
  font-size: 20px;
  margin-left: 4px;
  color: #666;
  flex-shrink: 0;
}

/* Search Section - FIXED PADDING */
.navbar-search-section {
  flex: 1;
  max-width: 600px;
  min-width: 200px;
  /* Remove any padding that might affect search container */
  padding: 0 !important;
  margin: 0 !important;
}

.search-container {
  width: 100%;
  /* Ensure no padding here */
  padding: 0 !important;
  margin: 0 !important;
}

.search-bar {
  position: relative;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
  width: 100%;
  /* Remove any padding from search bar */
  padding: 0 !important;
  margin: 0 !important;
}

.search-bar:focus-within {
  /* border-color: #f97316; */
  /* box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1); */
}

.search-input {
  display: flex;
  align-items: center;
  /* SPECIFIC PADDING FOR SEARCH INPUT CONTAINER */
  padding: 12px 16px !important; /* This is the padding you want */
  width: 100%;
  box-sizing: border-box;
}

.search-input-field {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  /* color: #333; */
  font-family: inherit;
  /* Remove any padding that might interfere */
  padding: 0 !important;
  margin: 0 !important;
}

.search-input-field::placeholder {
  color: #999;
}

.search-icon-button {
  cursor: pointer;
  padding: 4px 8px;
  border-left: 1px solid #e9ecef;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: color 0.2s;
  /* Ensure no extra padding */
  padding: 4px 8px !important;
}

.search-icon-button:hover {
  color: #f97316;
}

.search-icon {
  font-size: 18px;
}

/* Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.search-results-dropdown.mobile {
  position: fixed;
  top: 120px;
  left: 12px;
  right: 12px;
  bottom: 80px;
  max-height: none;
}

.search-results-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f1;
  background-color: #fafafa;
}

.search-query-text {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.no-results {
  text-align: center;
  padding: 32px 16px;
}

.searching-text, .no-results-text {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.no-results-hint {
  font-size: 12px;
  color: #999;
  margin: 4px 0 0 0;
}

.loading-more {
  padding: 16px;
  text-align: center;
  border-top: 1px solid #f1f1f1;
  font-size: 14px;
  color: #666;
}

.loading-spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f97316;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Right Section */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-link {
  text-decoration: none;
  color: inherit;
}

.signin-button {
  background: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.signin-button:hover {
  background-color: #f8f9fa;
}

.join-button, .dashboard-button {
  background: #f97316;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}

.join-button:hover, .dashboard-button:hover {
  opacity: 0.9;
}

/* User Menu */
.user-menu-container {
  position: relative;
}

.user-avatar-desktop {
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #f1f1f1;
  transition: border-color 0.2s;
}

.user-avatar-desktop:hover {
  border-color: #f97316;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1000;
}

.user-info {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f1;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.user-email {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f1;
  font-size: 12px;
  color: #666;
}

.logout-button {
  width: 100%;
  padding: 12px 16px;
  background: #f97316;
  border: none;
  border-radius: 0 0 6px 6px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}

.logout-button:hover {
  opacity: 0.9;
}

/* Mobile Specific Styles */
.navbar-mobile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-search-button, .mobile-user-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-mobile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* Mobile Expanded Search */
.mobile-search-expanded {
  background: white;
  padding: 12px;
  border-top: 1px solid #e9ecef;
}

.mobile-search-bar {
  position: relative;
}

.mobile-search-input {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  /* border: 1px solid #e9ecef; */
  border-radius: 8px;
  /* SPECIFIC PADDING FOR MOBILE SEARCH */
  padding: 12px 16px !important; /* Same padding for mobile */
}

.mobile-search-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #333;
  font-family: inherit;
  padding: 0 !important;
  margin: 0 !important;
}

.mobile-search-field::placeholder {
  color: #999;
}

.mobile-search-icon-button {
  cursor: pointer;
  padding: 4px 8px;
  border-left: 1px solid #e9ecef;
  margin: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.mobile-search-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.close-icon {
  font-size: 20px;
}

/* Mobile Location Bar */
.mobile-location-bar {
  background: #f8f9fa;
  padding: 8px 12px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
}

/* Drawer Styles */
.drawer-paper {
  width: 320px !important;
}

.drawer-content {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
/* Add to your Navbar.css */
.search-results-dropdown {
  max-height: 400px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border-radius: 8px;
  z-index: 1000;
  top: 100%;
  left: 0;
}

.load-more-container {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #eee;
  background: #f9f9f9;
}

.loading-more-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #666;
}

.small-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.load-more-hint {
  color: #666;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.scroll-hint {
  font-size: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-5px);}
  60% {transform: translateY(-2px);}
}

.searching-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile styles */
.search-results-dropdown.mobile {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100vw;
  max-height: calc(100vh - 60px);
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid #eee;
}

.drawer-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.drawer-close {
  background: rgba(33, 37, 41, 0.1);
  padding: 6px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-section {
  margin-bottom: 16px;
}

.drawer-section-title {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

.drawer-divider {
  height: 2px;
  background-color: #e9ecef;
  margin: 8px 0 16px 0;
}

.drawer-list {
  padding: 0 !important;
}

.drawer-menu-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0;
}

.drawer-menu-text {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: block;
  padding: 8px 0;
}

.drawer-item-divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 8px 0;
}

.drawer-auth {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.drawer-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-auth-link {
  text-decoration: none;
}

.drawer-signin, .drawer-join {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.drawer-signin {
  background: none;
  border: 1px solid #e9ecef;
  color: #333;
}

.drawer-join {
  background: #f97316;
  border: none;
  color: white;
}

.drawer-country {
  margin-top: 24px;
}

.country-list {
  max-height: 200px;
  overflow-y: auto;
}

.country-item {
  display: flex;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.country-item:hover {
  background-color: #f8f9fa;
}

.country-item.active {
  background-color: #e7f3ff;
}

.country-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  margin-right: 12px;
  border-radius: 2px;
}

.country-icon {
  font-size: 20px;
  margin-right: 12px;
}

.country-name {
  font-size: 14px;
  color: #333;
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
  .navbar-toolbar {
    gap: 12px;
  }
  
  .navbar-search-section {
    max-width: 500px;
  }
  
  .auth-buttons {
    gap: 8px;
  }
  
  .signin-button, .join-button, .dashboard-button {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  .navbar-toolbar {
    padding: 8px 12px !important;
  }
  
  .navbar-search-section {
    max-width: 400px;
  }
  
  .location-display {
    min-width: 120px;
    max-width: 160px;
  }
  
  .user-avatar-desktop {
    width: 40px;
    height: 40px;
  }
  
  /* Ensure search padding remains consistent on tablet */
  .search-input {
    padding: 12px 16px !important;
  }
}

@media (max-width: 768px) {
  .navbar-toolbar {
    padding: 8px 12px !important;
    min-height: 56px !important;
  }
  
  .navbar-logo.mobile {
    height: 60px;
  }
  
  .menu-icon {
    font-size: 20px;
  }
  
  .user-avatar-mobile {
    width: 32px;
    height: 32px;
  }
  
  /* Ensure mobile search padding remains consistent */
  .mobile-search-input {
    padding: 12px 16px !important;
  }
}

@media (max-width: 480px) {
  .navbar-toolbar {
    padding: 6px 8px !important;
  }
  
  .navbar-logo.mobile {
    height: 48px;
  }
  
  .menu-button, .mobile-search-button, .mobile-user-button {
    padding: 6px;
  }
  
  .user-avatar-mobile {
    width: 28px;
    height: 28px;
  }
  
  .mobile-search-expanded {
    padding: 8px;
  }
  
  .mobile-location-bar {
    padding: 6px 8px;
  }
  
  /* Adjust search padding for very small screens if needed */
  .search-input,
  .mobile-search-input {
    padding: 10px 14px !important;
  }
}

/* Utility Classes */
.warning {
  background-color: orange !important;
}

/* Ensure no horizontal scroll */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}