/* Entity Selector Styles */
.entity-selection-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1rem;
}

.entity-selection-section .section-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.entity-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.entity-count {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: normal;
}

.entity-selector {
    position: relative;
}

.entity-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.entity-search input {
    flex: 1;
    font-size: 0.875rem;
}

.entity-search .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.entity-lists {
    display: flex;
    gap: 0.5rem;
    min-height: 2rem;
}

.selected-entities,
.available-entities {
    flex: 1;
    min-height: 2rem;
    border: 1px dashed #dee2e6;
    border-radius: 0.25rem;
    padding: 0.25rem;
    background: white;
}

.selected-entities {
    border-color: #28a745;
    background: #f8fff9;
}

.available-entities {
    border-color: #6c757d;
    background: #f8f9fa;
}

.entity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.entity-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.entity-item.selected {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.entity-item.selected:hover {
    background: #c3e6cb;
}

.entity-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.entity-item .entity-info {
    flex: 1;
    min-width: 0;
}

.entity-item .entity-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-item .entity-subtitle {
    font-size: 0.625rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-item .entity-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.entity-item .btn {
    padding: 0.125rem 0.25rem;
    font-size: 0.625rem;
    line-height: 1;
}

.entity-item .btn-add {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.entity-item .btn-add:hover {
    background: #218838;
    border-color: #1e7e34;
}

.entity-item .btn-remove {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.entity-item .btn-remove:hover {
    background: #c82333;
    border-color: #bd2130;
}

.entity-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    color: #6c757d;
    font-size: 0.75rem;
    font-style: italic;
}

.entity-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.entity-search-result {
    padding: 0.5rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.entity-search-result:hover {
    background: #f8f9fa;
}

.entity-search-result:last-child {
    border-bottom: none;
}

.entity-search-result .result-title {
    font-weight: 500;
    font-size: 0.875rem;
}

.entity-search-result .result-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Dark theme support */
[data-bs-theme="dark"] .entity-selection-section .section-title {
    color: #adb5bd;
}

[data-bs-theme="dark"] .entity-group {
    background: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .entity-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .entity-count {
    color: #6c757d;
}

[data-bs-theme="dark"] .selected-entities {
    border-color: #198754;
    background: #051b11;
}

[data-bs-theme="dark"] .available-entities {
    border-color: #495057;
    background: #2b3035;
}

[data-bs-theme="dark"] .entity-item {
    background: #343a40;
    border-color: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .entity-item:hover {
    background: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .entity-item.selected {
    background: #0f5132;
    border-color: #198754;
    color: #75b798;
}

[data-bs-theme="dark"] .entity-item.selected:hover {
    background: #146c43;
}

[data-bs-theme="dark"] .entity-item.disabled {
    background: #2b3035;
    opacity: 0.5;
}

[data-bs-theme="dark"] .entity-item .entity-subtitle {
    color: #6c757d;
}

[data-bs-theme="dark"] .entity-empty {
    color: #6c757d;
}

[data-bs-theme="dark"] .entity-search-results {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .entity-search-result {
    border-bottom-color: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .entity-search-result:hover {
    background: #495057;
}

[data-bs-theme="dark"] .entity-search-result .result-subtitle {
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .entity-lists {
        flex-direction: column;
    }
    
    .entity-search {
        flex-direction: column;
    }
    
    .entity-search .btn {
        align-self: flex-end;
    }
} 