/* static/css/tags-system.css */

/* Barre de recherche */
.tags-search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 4px 4px 14px;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.tags-search-box:focus-within {
    border-color: #14B8A6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.tags-search-box .search-icon {
    color: #9ca3af;
    font-size: 1rem;
}

.tags-search-box input {
    border: none !important;
    outline: none !important;
    flex: 1;
    font-size: 0.92rem;
    color: #1f2937;
    background: transparent;
    padding: 9px 0;
}

.tags-search-box .add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: linear-gradient(135deg, #14B8A6 0%, #0d9488 100%);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(20, 184, 166, 0.25);
}

.tags-search-box .add-btn:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0a7c6e 100%);
    transform: translateY(-1px);
}

/* Dropdown suggestions */
.tags-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    padding: 4px;
}

.tags-dropdown.show { display: block; }

.dropdown-item-tag {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
}

.dropdown-item-tag:hover { 
    background-color: #f0fdfa;
    color: #0d9488;
}

.dropdown-create {
    padding: 11px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #14B8A6;
    font-weight: 600;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-create:hover { background-color: #f0fdfa; }

/* Pills sélectionnés */
.selected-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    background: linear-gradient(135deg, #14B8A6 0%, #0d9488 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.3);
}

.selected-pill .pill-remove {
    cursor: pointer;
    opacity: 0.85;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.selected-pill .pill-remove:hover {
    background-color: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

/* Tags cloud */
#tags-cloud,
#modal-tags-cloud {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    max-height: 200px;
    overflow-y: auto;
    padding: 14px !important;
    margin-top: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background-color: #f9fafb;
}

#tags-cloud::-webkit-scrollbar,
#modal-tags-cloud::-webkit-scrollbar { width: 6px; }

#tags-cloud::-webkit-scrollbar-thumb,
#modal-tags-cloud::-webkit-scrollbar-thumb {
    background: #14B8A6;
    border-radius: 4px;
}

/* Tag chip */
#tags-cloud .tag-chip,
#modal-tags-cloud .tag-chip {
    display: inline-flex !important;
    align-items: center !important;
    padding: 7px 16px !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    white-space: nowrap !important;
    border: 1.5px solid #d1d5db !important;
    background-color: white !important;
    color: #4b5563 !important;
    line-height: 1.3 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

#tags-cloud .tag-chip:hover,
#modal-tags-cloud .tag-chip:hover {
    border-color: #14B8A6 !important;
    color: #0d9488 !important;
    background-color: #f0fdfa !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(20,184,166,0.25) !important;
}

#tags-cloud .tag-chip.selected,
#modal-tags-cloud .tag-chip.selected {
    background: #14B8A6 !important;
    color: white !important;
    border-color: #0d9488 !important;
    box-shadow: 0 2px 8px rgba(20,184,166,0.4) !important;
}

#tags-cloud .tag-chip.selected:hover,
#modal-tags-cloud .tag-chip.selected:hover {
    background: #0d9488 !important;
}