/* Provider Selector Component Styles */

/* ============================================================================
   SINGLE SELECT
   ============================================================================ */

.providerSelect {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs, 4px);
}

.label {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-text-secondary);
}

.select {
  padding: var(--spacing-xs, 4px) var(--spacing-sm, 8px);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md, 6px);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm, 0.875rem);
  cursor: pointer;
  min-width: 150px;
}

.select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================================
   MULTI SELECT
   ============================================================================ */

.providerMultiSelect {
  position: relative;
  display: inline-block;
}

/* Trigger Button */
.triggerButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  background: var(--surface-color, #ffffff);
  color: var(--text-secondary, #666666);
  cursor: pointer;
  transition: all 0.2s;
}

.triggerButton:hover:not(:disabled) {
  background: var(--hover-bg, rgba(0, 0, 0, 0.06));
  color: var(--text-primary, #1a1a1a);
}

.triggerButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.buttonIcon {
  font-size: 1.1rem;
}

/* Dropdown Content - opens upward */
.dropdownContent {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 8px;
  background: var(--surface-color, #ffffff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  min-width: 220px;
}

.dropdownHeader {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary, #666666);
  padding: 4px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.selectActions {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.actionButton {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-secondary, #666666);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.actionButton:hover:not(:disabled) {
  background: var(--hover-bg, rgba(0, 0, 0, 0.06));
  color: var(--text-primary, #1a1a1a);
}

.actionButton.active {
  background: var(--primary-color, #f25843);
  border-color: var(--primary-color, #f25843);
  color: #fff;
}

.actionButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkboxList {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: var(--bg-secondary, #f8f9fa);
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.checkboxItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  color: var(--text-primary, #1a1a1a);
}

.checkboxItem:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.06));
  color: var(--text-primary, #1a1a1a);
}

.checkboxItem.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkboxItem input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: inherit;
  accent-color: var(--primary-color, #f25843);
}

.icon {
  font-size: 1rem;
}

.providerName {
  font-size: 0.8rem;
  color: inherit;
}

.hint {
  font-size: 0.7rem;
  color: var(--text-tertiary, #888888);
  text-align: center;
  padding: 4px 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: var(--text-secondary, #666666);
  font-size: 0.8rem;
}

/* Dark theme: list hover stays a light lift, not a black wash */
:global(.dark-theme) .checkboxItem:hover {
  background: var(--hover-bg, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #e5e7eb);
}

:global(.dark-theme) .checkboxItem {
  color: var(--text-primary, #e5e7eb);
}

:global(.dark-theme) .dropdownContent {
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

/* ============================================================================
   PROVIDER BADGES
   ============================================================================ */

.providerBadges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs, 4px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm, 4px);
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--color-text-primary);
}

.allProviders {
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--color-text-secondary);
  font-style: italic;
}
