/**
 * Conversation Tags Styles
 * Color-coded tags and tag selector
 */

.tags-section {
    margin-bottom: 20px;
}

.tags-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tags-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1a202c);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-header h4 i {
    color: var(--accent-primary, #C41E3A);
    font-size: 13px;
}

.add-tag-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-primary, #e2e8f0);
    background: white;
    border-radius: 6px;
    color: var(--text-tertiary, #718096);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-tag-btn:hover {
    background: var(--accent-primary, #C41E3A);
    color: white;
    border-color: var(--accent-primary, #C41E3A);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.conversation-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    cursor: default;
    transition: all 0.2s;
}

.conversation-tag i {
    font-size: 11px;
}

.conversation-tag .tag-remove {
    margin-left: 4px;
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.2s;
    padding: 0;
}

.conversation-tag .tag-remove:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Tag Selector Modal */
.tag-selector-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.tag-selector-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-primary, #e2e8f0);
}

.tag-selector-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1a202c);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-selector-header h3 i {
    color: var(--accent-primary, #C41E3A);
}

.tag-selector-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: var(--text-tertiary, #718096);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tag-selector-close:hover {
    background: var(--bg-tertiary, #f6f8fa);
    color: var(--text-primary, #1a202c);
}

.tag-selector-body {
    padding: 20px;
}

.tag-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tag-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tag-option-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.tag-option span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1a202c);
}

.no-tags {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary, #718096);
    font-size: 14px;
}

/* Dark mode */
html.dark-mode .add-tag-btn {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

html.dark-mode .add-tag-btn:hover {
    background: var(--accent-primary, #C41E3A);
    color: white;
    border-color: var(--accent-primary, #C41E3A);
}

html.dark-mode .tags-header h4 {
    color: #f9fafb;
}

html.dark-mode .tag-selector-content {
    background: #1f2937;
}

html.dark-mode .tag-selector-header {
    border-color: #374151;
}

html.dark-mode .tag-selector-header h3 {
    color: #f9fafb;
}

html.dark-mode .tag-selector-close:hover {
    background: #374151;
    color: #f9fafb;
}

html.dark-mode .tag-option {
    background: #111827;
}

html.dark-mode .tag-option span {
    color: #f9fafb;
}

html.dark-mode .no-tags {
    color: #9ca3af;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .tag-selector-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
