.hidden {
  display: none !important;
}

/* Hijack Dropdown Improvements */
.hijack-dropdown-content {
  min-width: 850px;
  max-width: 1200px;
}

/* Multi-column layout */
.hijack-mega-menu {
  display: block;
}

.hijack-mega-menu-container {
  display: flex;
  gap: 0;
  max-height: 500px;
}

.hijack-dropdown-section {
  flex: 1;
  min-width: 280px;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border-primary);
}

.hijack-dropdown-section:last-child {
  border-right: none;
}

/* Custom Scrollbar for Sections */
.hijack-dropdown-section::-webkit-scrollbar {
  width: 6px;
}

.hijack-dropdown-section::-webkit-scrollbar-track {
  background: var(--surface-secondary);
}

.hijack-dropdown-section::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.hijack-dropdown-section::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.hijack-dropdown-section {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f8f9fa;
}

.hijack-user-list {
  max-height: none;
  overflow: visible;
}

/* User Groups within columns */
.user-group {
  margin-bottom: 0.5rem;
}

.hijack-user-item {
  transition: all 0.2s ease;
}

.hijack-user-item:hover {
  background: var(--surface-secondary);
}

/* Search Input Styling */
.hijack-search-input {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-primary);
}

.hijack-search-input .input-group-text {
  background: transparent;
  border-right: 0;
}

.hijack-search-input .form-control {
  border-left: 0;
}

.hijack-search-input .form-control:focus {
  border-color: #007bff;
  box-shadow: none;
}

.hijack-search-input .input-group:focus-within .input-group-text {
  border-color: #007bff;
}

/* User Group Headers - Sticky */
.user-group .dropdown-header {
  position: sticky;
  top: 0;
  background: var(--surface-secondary);
  z-index: 5;
  border-bottom: 2px solid var(--border-primary);
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* User Avatar */
.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.user-info-small {
  flex: 1;
  min-width: 0;
}

.user-info-small .user-name {
  font-weight: 300;
  color: var(--text-primary);
  font-size: 0.675rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-small .user-details {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hijack-user-link {
  padding: 0.4rem 0.75rem !important;
  transition: all 0.15s ease;
  display: block;
}

.hijack-user-link:hover {
  background: var(--surface-tertiary) !important;
  padding-left: 1.25rem !important;
}

.hijack-user-link:hover .fa-sign-in-alt {
  color: #007bff !important;
}

/* Keyboard Navigation */
.hijack-user-link:focus,
.hijack-user-link.keyboard-focus {
  outline: 2px solid #007bff;
  outline-offset: -2px;
  background: #e7f3ff !important;
  z-index: 1;
}

.hijack-user-link:focus .fa-sign-in-alt,
.hijack-user-link.keyboard-focus .fa-sign-in-alt {
  color: #007bff !important;
}

/* Footer */
.hijack-footer {
  position: sticky;
  bottom: 0;
  background: var(--surface-primary);
  z-index: 10;
}

/* Empty State */
.hijack-empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.hijack-empty-state i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* Badge Styling */
.dropdown-header .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Hijack Confirmation Modal Styles */
.hijack-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

.hijack-confirm-modal {
  /* Dark theming now comes from design tokens (body.dark-mode remap) */
  background: var(--surface-primary);
  color: var(--text-primary);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

.hijack-confirm-header {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.hijack-confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.9;
}

.hijack-confirm-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.hijack-confirm-body {
  padding: 25px;
}

.user-info-card {
  background: var(--surface-secondary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar-large {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.user-details .user-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-details .user-username {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.warning-message {
  background: var(--color-warning-light);
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.warning-message i {
  color: var(--color-warning-dark);
  margin-top: 2px;
  flex-shrink: 0;
}

.warning-message p {
  margin: 0;
  color: var(--color-warning-dark);
  font-size: 0.9rem;
  line-height: 1.4;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  justify-content: center;
}

.security-note i {
  color: var(--color-success);
}

.hijack-confirm-footer {
  background: var(--surface-secondary);
  padding: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-primary);
}

.hijack-confirm-footer .btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hijack-cancel {
  background: #6c757d;
  color: white;
}

.hijack-cancel:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.hijack-confirm {
  background: linear-gradient(135deg, #ffc107, #ff8f00);
  color: white;
}

.hijack-confirm:hover {
  background: linear-gradient(135deg, #e0a800, #e68900);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Loading Overlay */
.hijack-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.hijack-loading-content {
  text-align: center;
  color: white;
}

.hijack-loading-content .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Dark mode now comes from design tokens (body.dark-mode remap); OS-driven prefers-color-scheme block removed. */

/* Responsive design */
@media (max-width: 480px) {
  .hijack-confirm-modal {
    margin: 20px;
    width: calc(100% - 40px);
  }

  .hijack-confirm-header {
    padding: 15px;
  }

  .hijack-confirm-body {
    padding: 20px;
  }

  .hijack-confirm-footer {
    padding: 15px;
    flex-direction: column;
  }

  .hijack-confirm-footer .btn {
    width: 100%;
  }
}
