/* Custom Filter Chips - Minimalist Design with Smooth Animations */

/* Container for filter chips */
.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 10px 0;
}

/* Individual filter chip - minimalist style */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f8f9fa;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    font-size: 13px;
    color: #495057;
    line-height: 1.5;
    transition: all 0.2s ease;
    animation: chipFadeIn 0.25s ease-out;
    white-space: nowrap;
}

/* Fade in animation when chip is added */
@keyframes chipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade out animation when chip is removed */
@keyframes chipFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Chip removal state */
.filter-chip.removing {
    animation: chipFadeOut 0.25s ease-out forwards;
}

/* Hover effect - subtle green accent */
.filter-chip:hover {
    border-color: #54b848;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(84, 184, 72, 0.2);
}

/* Close button styling - force small size */
.filter-chip .btn-close {
    margin-left: 2px;
    margin-right: -2px;
    padding: 0 !important;
    width: 12px !important;
    height: 12px !important;
    font-size: 10px !important;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    flex-shrink: 0;
    background-size: 10px !important;
}

.filter-chip .btn-close:hover {
    opacity: 0.9;
}

.filter-chip .btn-close:focus {
    outline: 1px solid #54b848;
    outline-offset: 1px;
    opacity: 0.9;
}

/* Attachment chip variant (for Chat page) */
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    color: #333333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: chipFadeIn 0.3s ease-out;
    margin-right: 8px;
    margin-bottom: 8px;
}

.attachment-chip:hover {
    border-color: #54b848;
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(84, 184, 72, 0.15);
    transform: translateY(-1px);
}

.attachment-chip .chip-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
}

.attachment-chip .chip-delete-btn {
    margin-left: 4px;
    padding: 0;
    width: 18px;
    height: 18px;
    font-size: 12px;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.attachment-chip .chip-delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    color: #dc3545;
}

.attachment-chip .chip-delete-btn:focus {
    outline: 2px solid #54b848;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .filter-chips-container {
        gap: 6px;
        margin: 8px 0;
    }
    
    .filter-chip,
    .attachment-chip {
        padding: 5px 10px;
        font-size: 13px;
        border-radius: 18px;
    }
    
    .filter-chip .btn-close,
    .attachment-chip .chip-delete-btn {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
}

/* Clear filters button integration */
.filter-chips-container .btn.green-btn {
    margin-left: 4px;
    padding: 4px 12px !important;
    font-size: 13px !important;
    height: auto !important;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.filter-chips-container .btn.green-btn:hover {
    box-shadow: 0 2px 4px rgba(84, 184, 72, 0.25);
}

