/* Tag Input System CSS */
:root {
    --tag-bg: #f1f5f9;
    --tag-color: #334155;
    --tag-remove-hover: #ef4444;
    --dropdown-bg: #ffffff;
    --dropdown-border: #e2e8f0;
    --dropdown-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --option-hover: #f8fafc;
    --option-selected-bg: #eff6ff;
    --option-selected-color: #2563eb;
    --input-focus-ring: rgba(37, 99, 235, 0.1);
}

.tag-input-container {
    position: relative;
    width: 100%;
    min-height: 42px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    cursor: text;
    transition: all 0.2s ease;
}

.tag-input-container:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--tag-bg);
    color: var(--tag-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    animation: tagIn 0.2s ease-out;
}

@keyframes tagIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.1s ease;
}

.tag-remove:hover {
    background: var(--tag-remove-hover);
    color: #fff;
}

.tag-input-field {
    flex: 1;
    min-width: 60px;
    border: none;
    outline: none;
    padding: 4px 0;
    font-size: 14px;
    background: transparent;
}

.tag-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 240px;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 8px;
    box-shadow: var(--dropdown-shadow);
    z-index: 1000;
    overflow-y: auto;
    display: none;
}

.tag-dropdown.open {
    display: block;
}

.tag-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: background 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tag-option:hover, .tag-option.highlighted {
    background: var(--option-hover);
}

.tag-option.selected {
    background: var(--option-selected-bg);
    color: var(--option-selected-color);
    font-weight: 500;
}

.tag-option.selected::after {
    content: '✓';
    font-size: 12px;
}

.tag-no-results {
    padding: 12px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* Table View Style (Requirement 9) */
.tag-display-joined {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
}

.tag-display-joined span::after {
    content: ' • ';
    opacity: 0.5;
}

.tag-display-joined span:last-child::after {
    content: '';
}
