/* Assignee Styles */

/* Assignee mini indicator for block lists */
.assignee-mini {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-left: 8px;
  opacity: 0.9;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.assignee-mini:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Add assignee button */
.assignee-add-btn {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
  border: 1px dashed rgba(108, 117, 125, 0.3);
}

.assignee-add-btn:hover {
  background-color: rgba(13, 110, 253, 0.15);
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.4);
  border-style: solid;
}

.assignee-add-btn i {
  font-size: 0.8rem;
}

/* Assigned user indicator */
.assignee-assigned {
  background-color: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
  border: 1px solid rgba(13, 110, 253, 0.25);
}

.assignee-assigned:hover {
  background-color: rgba(13, 110, 253, 0.2);
  border-color: rgba(13, 110, 253, 0.4);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

/* Avatar circle */
.assignee-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  margin-right: 4px;
  text-transform: uppercase;
}

.assignee-name {
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Assignee picker dropdown */
.assignee-picker {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  max-width: 280px;
  max-height: 350px;
  overflow-y: auto;
  animation: fadeInDown 0.2s ease;
  z-index: 1050;
}

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

.assignee-picker-header {
  font-size: 0.9rem;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 8px;
}

.assignee-picker-header .btn-close {
  width: 16px;
  height: 16px;
  padding: 0;
  background-size: 8px;
  opacity: 0.5;
}

.assignee-picker-header .btn-close:hover {
  opacity: 1;
}

/* Individual assignee option */
.assignee-option {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  margin-bottom: 2px;
}

.assignee-option:hover {
  background-color: #f8f9fa;
}

.assignee-option-selected {
  background-color: rgba(13, 110, 253, 0.1);
}

.assignee-option-selected:hover {
  background-color: rgba(13, 110, 253, 0.15);
}

.assignee-option-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #6c757d;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 10px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.assignee-option-selected .assignee-option-avatar {
  background-color: #0d6efd;
}

.assignee-option-name {
  flex-grow: 1;
  font-size: 0.9rem;
  color: #212529 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Remove assignment option */
.assignee-option.text-danger:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

.assignee-option.text-danger .assignee-option-name {
  color: #dc3545;
}

/* Assignee filter styles */
.assignee-filter-dropdown {
  min-width: 200px;
}

.assignee-filter.active {
  background-color: #0d6efd;
  color: white;
}

.assignee-filter.active:hover {
  background-color: #0b5ed7;
}

/* Assignee filter option styles */
.assignee-filter-option {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.assignee-filter-option.active {
  background-color: #0d6efd;
  color: white;
}

.assignee-filter-option.active:hover {
  background-color: #0b5ed7;
  color: white;
}

/* Assignee mini container positioning */
.assignee-mini-container {
  display: inline-flex;
  align-items: center;
}

/* Block styling based on assignee */
.task-item[data-assignee] {
  position: relative;
}

/* My tasks indicator */
.task-item.assigned-to-me {
  border-left: 3px solid #0d6efd;
}

/* Unassigned indicator */
.task-item.unassigned {
  opacity: 0.85;
}

/* Responsive assignee display - progressively reduce to preserve block titles */

/* Medium-large screens: slightly shorter name */
@media (max-width: 1199px) {
  .assignee-name {
    max-width: 100px;
  }
}

/* Tablets and smaller: hide name, show icon only */
@media (max-width: 991px) {
  .assignee-name {
    display: none;
  }

  .assignee-avatar {
    margin-right: 0;
  }

  .assignee-mini {
    padding: 3px 5px;
  }
}

/* Mobile: smaller icon */
@media (max-width: 768px) {
  .assignee-mini {
    padding: 2px 4px;
    font-size: 0.7rem;
  }

  .assignee-avatar {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }

  .assignee-picker {
    min-width: 180px;
    max-width: 250px;
  }

  .assignee-option-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .assignee-option-name {
    font-size: 0.85rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .assignee-picker {
    background-color: #2b2b2b;
    border-color: #444;
    color: #f0f0f0;
  }

  .assignee-option:hover {
    background-color: #3a3a3a;
  }

  .assignee-option-name {
    color: #f0f0f0;
  }

  .assignee-picker-header {
    border-bottom-color: #444;
  }
}

/* Persona-specific styles */
.assignee-persona {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 1px solid rgba(118, 75, 162, 0.4);
}

.assignee-persona:hover {
  background: linear-gradient(135deg, #7e8ef0 0%, #8d5bb8 100%);
  box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.25);
}

.assignee-persona .persona-avatar {
  font-size: 1.1em;
  background: transparent;
  color: white;
}

.assignee-persona .assignee-name {
  color: white;
  font-weight: 500;
}

/* Persona section in picker */
.assignee-picker-personas {
  border-top: 1px solid #eee;
  margin-top: 8px;
  padding-top: 8px;
}

.assignee-picker-section-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 4px;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Persona avatar in picker */
.assignee-option-avatar.persona-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-size: 1.1em;
}

.assignee-option-selected .assignee-option-avatar.persona-avatar {
  background: linear-gradient(135deg, #7e8ef0 0%, #8d5bb8 100%);
}

/* Dark mode support for personas */
@media (prefers-color-scheme: dark) {
  .assignee-picker-personas {
    border-top-color: #444;
  }

  .assignee-picker-section-header {
    color: #aaa;
  }
}
