/* Modern Navbar Design - Friendly & Contemporary */

/* Modern Property Selector */
.modern-property-selector {
  margin-right: 1.5rem;
}

.selector-label {
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.modern-selector-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  min-width: 200px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


.selector-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selector-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
}

.selector-text {
  flex: 1;
  text-align: left;
}

.property-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--bs-body-color);
  margin-bottom: 0.125rem;
}

.unit-info {
  font-size: 0.75rem;
  color: var(--bs-secondary);
}

.selector-arrow {
  color: var(--bs-secondary);
  transition: transform 0.3s ease;
}

.modern-selector-btn[aria-expanded="true"] .selector-arrow {
  transform: rotate(180deg);
}

/* Modern Dropdown Styles */
.modern-dropdown {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  min-width: 280px;
}

.dropdown-header {
  padding: 1rem 1rem 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.modern-dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.25rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--bs-body-color);
}

/* .modern-dropdown-item:hover {
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
  color: white;
  transform: translateX(4px);
} */

.item-icon {
  width: 36px;
  height: 36px;
  background: rgba(var(--bs-primary-rgb), 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  transition: all 0.3s ease;
}

/* .modern-dropdown-item:hover .item-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
} */

.item-content {
  flex: 1;
}

.item-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.item-subtitle {
  font-size: 0.75rem;
  opacity: 0.7;
}

.add-property-btn {
  background: linear-gradient(135deg, rgba(var(--bs-success-rgb), 0.1) 0%, rgba(var(--bs-info-rgb), 0.1) 100%);
  border: 1px dashed var(--bs-success);
}


/* Modern Navigation Buttons */
.modern-nav-btn {
  position: relative;
  padding: 0.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}


.nav-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--bs-success);
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
}

/* Modern User Button */
.modern-user-btn {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--bs-body-color);
}

/* .modern-user-btn:hover {
  background: rgba(var(--bs-primary-rgb), 0.1);
  transform: translateY(-1px);
  color: var(--bs-body-color);
} */

.modern-avatar {
  position: relative;
  margin-right: 0.75rem;
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.avatar-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: var(--bs-success);
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.user-role {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* User Dropdown Header */
.user-profile-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
  border-radius: 12px;
  margin: -0.5rem -0.5rem 0.5rem;
  color: white;
}

.profile-avatar {
  position: relative;
  margin-right: 1rem;
}

.profile-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--bs-success);
  border-radius: 50%;
  border: 2px solid white;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.profile-role {
  font-size: 0.875rem;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
}

/* Dark Mode Fixes */
[data-theme="dark"] .dropdown-menu {
  background: #2b2c40 !important;
  border: 1px solid #404258 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .dropdown-item {
  color: #a8aaae !important;
}

.btn-group-vertical>.btn-check:checked+.btn, .btn-group-vertical>.btn-check:focus+.btn, .btn-group-vertical>.btn.active, .btn-group-vertical>.btn:active, .btn-group-vertical>.btn:focus, .btn-group-vertical>.btn:hover, .btn-group>.btn-check:checked+.btn, .btn-group>.btn-check:focus+.btn, .btn-group>.btn.active, .btn-group>.btn:active, .btn-group>.btn:focus, .btn-group>.btn:hover {
  z-index: 0 !important;
}

[data-theme="dark"] .dropdown-item:focus {
  background: #404258 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .selector-btn,
[data-theme="dark"] .btn-outline-secondary {
  background: #2b2c40 !important;
  border-color: #404258 !important;
  color: #a8aaae !important;
}


[data-theme="dark"] .select-label {
  color: #a8aaae !important;
  background-color: #2b2c40 !important;
}

[data-theme="dark"] .selector-content {
  color: #a8aaae !important;
}

[data-theme="dark"] .dropdown-divider {
  border-color: #404258 !important;
}

[data-theme="dark"] .badge.bg-label-primary {
  background: rgba(105, 108, 255, 0.16) !important;
  color: #696cff !important;
}

[data-theme="dark"] .text-muted {
  color: #a8aaae !important;
}

/* Mobile Property Selector */
.mobile-property-selector {
  display: flex !important;
  align-items: center;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px;
  background: rgba(var(--bs-primary-rgb), 0.1);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
  transition: all 0.3s ease;
  text-decoration: none !important;
  color: var(--bs-body-color) !important;
  white-space: nowrap;
}

.mobile-property-selector:hover {
  background: rgba(var(--bs-primary-rgb), 0.15) !important;
  color: var(--bs-body-color) !important;
}

.mobile-property-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark mode support for mobile selector */
[data-theme="dark"] .mobile-property-selector {
  background: rgba(105, 108, 255, 0.1) !important;
  border-color: rgba(105, 108, 255, 0.2) !important;
  color: #a8aaae !important;
}

[data-theme="dark"] .mobile-property-selector:hover {
  background: rgba(105, 108, 255, 0.15) !important;
  color: #ffffff !important;
}

/* Property Dropdown Styling */
.property-dropdown,
.property-dropdown-mobile {
  min-width: 280px;
  max-width: 400px;
}

.property-dropdown .dropdown-item,
.property-dropdown-mobile .dropdown-item {
  white-space: normal;
  word-wrap: break-word;
  padding: 0.75rem 1rem;
  line-height: 1.4;
}

.property-dropdown .dropdown-item i,
.property-dropdown-mobile .dropdown-item i {
  flex-shrink: 0;
  margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .property-selector-container {
    margin-right: 1rem;
  }
  
  .selector-btn {
    min-width: 160px;
    max-width: 280px;
    padding-right: 1.5rem;
  }
  
  .property-name-full {
    max-width: 200px;
  }
}

@media (max-width: 767.98px) {
  .property-selector-container {
    display: none !important;
  }
  
  .navbar-search-wrapper span {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  .navbar-nav .nav-item {
    margin-right: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.25rem;
  }
}

/* Property Selector Button Fixes */
.selector-btn {
  min-width: 120px;
  max-width: 350px;
  text-align: left;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-right: 1.75rem; /* leave room for caret */
}

/* Property name styling */
.property-name-full {
  display: inline-block;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.property-name-mobile {
  display: inline-block;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.selector-btn:focus {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-primary);
}

/* Ensure Bootstrap caret shows and aligns on the right */
.selector-btn.dropdown-toggle::after {
  margin-left: .5rem;
}

/* The inner content should handle truncation, not the button */
.selector-content {
  flex: 1 1 auto;
  min-width: 0; /* enable ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Remove hover effects from Bootstrap buttons */
.btn-outline-secondary:hover {
  background: var(--bs-secondary-bg) !important;
  border-color: var(--bs-border-color) !important;
  color: var(--bs-body-color) !important;
  transform: none !important;
}

.dropdown-toggle:hover {
  background: var(--bs-secondary-bg) !important;
  border-color: var(--bs-border-color) !important;
  color: var(--bs-body-color) !important;
  transform: none !important;
}

.nav-link:hover {
  color: var(--bs-nav-link-color) !important;
  background: transparent !important;
  transform: none !important;
}

.dropdown-item:hover {
  background-color: var(--bs-dropdown-link-hover-bg) !important;
  color: var(--bs-dropdown-link-hover-color) !important;
  transform: none !important;
}

.selector-btn.show {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-primary);
}

.select-label {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  margin-bottom: 0.25rem;
}

@media (max-width: 575.98px) {
  .navbar-nav .nav-item {
    margin-right: 0.25rem;
  }
  
  .modern-dropdown {
    min-width: 260px;
  }
  
  .property-dropdown-mobile {
    min-width: 250px;
    max-width: 320px;
  }
  
  .property-name-mobile {
    max-width: 150px;
  }
}

/* Animations & Interactions */
.modern-dropdown-item {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-indicator {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Accessibility Improvements */
.modern-nav-btn:focus,
.modern-user-btn:focus,
.modern-selector-btn:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Gradient Badges */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%) !important;
  color: white !important;
}

/* Enhanced Tooltips */
.tooltip {
  z-index: 1060;
}


