/**
 * Workspace Dropdown Styles for PinWatch Module Sidebar
 * 
 * Matches other modules' design with dark mode support
 */

/* Container */
.workspace-dropdown-container {
  position: relative;
  padding: 0.5rem;
}

/* Trigger Button */
.workspace-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
  background: #1f2937;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.workspace-dropdown-trigger:hover {
  background: #374151;
  border-color: #4b5563;
}

.workspace-dropdown-trigger-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.workspace-dropdown-trigger-content svg {
  color: #ef4444;
  flex-shrink: 0;
}

.workspace-dropdown-trigger .workspace-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-dropdown-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: #9ca3af;
}

/* Dropdown Menu */
.workspace-dropdown-menu {
  display: none;
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(100% + 0.5rem);
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.3);
  z-index: 100;
  animation: slideUp 0.2s ease-out;
}

.workspace-dropdown-menu.open {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.workspace-dropdown-header {
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  border-bottom: 1px solid #374151;
}

/* List */
.workspace-dropdown-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.25rem;
}

.workspace-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.workspace-dropdown-list::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-dropdown-list::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 3px;
}

/* Empty State */
.workspace-dropdown-empty {
  padding: 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Workspace Item */
.workspace-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.875rem;
  text-align: left;
}

.workspace-dropdown-item:hover {
  background: #374151;
}

.workspace-dropdown-item.active {
  background: rgba(239, 68, 68, 0.15);
}

.workspace-dropdown-item svg {
  color: #9ca3af;
  flex-shrink: 0;
}

.workspace-dropdown-item.active svg:first-child {
  color: #ef4444;
}

.workspace-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-item-check {
  color: #ef4444;
  flex-shrink: 0;
}

/* Light Mode Overrides */
[data-theme="light"] .workspace-dropdown-trigger {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #374151;
}

[data-theme="light"] .workspace-dropdown-trigger:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

[data-theme="light"] .workspace-dropdown-menu {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .workspace-dropdown-header {
  color: #6b7280;
  border-color: #e5e7eb;
}

[data-theme="light"] .workspace-dropdown-item {
  color: #374151;
}

[data-theme="light"] .workspace-dropdown-item:hover {
  background: #f3f4f6;
}

[data-theme="light"] .workspace-dropdown-item.active {
  background: rgba(239, 68, 68, 0.1);
}