/**
 * Tags System Styles
 */

/* ========================================
   TAGS DISPLAY
======================================== */

.twm-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.twm-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border: 1.5px solid #E0E0E0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.twm-tag-item:hover {
    border-color: #FF385C;
    background: linear-gradient(135deg, #FFF1F3 0%, #FFE4E8 100%);
    color: #FF385C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.2);
}

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

/* Tag Colors by Category */
.twm-tag-bio { 
    border-color: #10B981; 
    color: #059669;
}
.twm-tag-bio:hover {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: #10B981;
    color: #047857;
}

.twm-tag-local {
    border-color: #0EA5E9;
    color: #0284C7;
}
.twm-tag-local:hover {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-color: #0EA5E9;
    color: #0369A1;
}

.twm-tag-ambiance {
    border-color: #EC4899;
    color: #DB2777;
}
.twm-tag-ambiance:hover {
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%);
    border-color: #EC4899;
    color: #BE185D;
}

.twm-tag-special {
    border-color: #8B5CF6;
    color: #7C3AED;
}
.twm-tag-special:hover {
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
    border-color: #8B5CF6;
    color: #6D28D9;
}

.twm-tag-gastronomique {
    border-color: #F59E0B;
    color: #D97706;
}
.twm-tag-gastronomique:hover {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: #F59E0B;
    color: #B45309;
}

/* ========================================
   TAGS FILTER BAR
======================================== */

.twm-tags-filter-bar {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.twm-tags-filter-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
}

.twm-tags-filter-title i {
    color: #FF385C;
}

.twm-tags-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.twm-tag-filter-btn {
    padding: 8px 16px;
    background: #F7F7F7;
    border: 2px solid transparent;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.twm-tag-filter-btn:hover {
    background: #FFF1F3;
    color: #FF385C;
    border-color: #FF385C;
}

.twm-tag-filter-btn.active {
    background: linear-gradient(135deg, #FF385C 0%, #FF6B88 100%);
    color: white;
    border-color: #FF385C;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
}

/* ========================================
   TAGS CLOUD
======================================== */

.twm-tags-cloud {
    background: linear-gradient(135deg, #F7F9FC 0%, #EEF2F7 100%);
    padding: 32px;
    border-radius: 20px;
    margin: 40px 0;
}

.twm-tags-cloud-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #222;
}

.twm-tags-cloud-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.twm-tag-cloud-item {
    padding: 10px 18px;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.twm-tag-cloud-item::before {
    content: '#';
    color: #999;
    margin-right: 4px;
}

.twm-tag-cloud-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* Size variations for tag cloud */
.twm-tag-size-1 { font-size: 12px; }
.twm-tag-size-2 { font-size: 13px; }
.twm-tag-size-3 { font-size: 14px; }
.twm-tag-size-4 { font-size: 15px; font-weight: 700; }
.twm-tag-size-5 { font-size: 16px; font-weight: 700; }

/* ========================================
   TAGS ON MEAL CARDS
======================================== */

.twm-meal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.twm-meal-tag {
    padding: 4px 10px;
    background: linear-gradient(135deg, #F7F9FC 0%, #EEF2F7 100%);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s ease;
}

.twm-meal-tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.twm-meal-tag::before {
    content: '#';
    margin-right: 2px;
    opacity: 0.7;
}

/* ========================================
   TAGS FILTER SIDEBAR
======================================== */

.twm-tags-sidebar {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.twm-tags-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.twm-tags-sidebar-title i {
    color: #FF385C;
    font-size: 20px;
}

.twm-tag-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.twm-tag-checkbox:hover {
    background: #F7F9FC;
}

.twm-tag-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.twm-tag-checkbox label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    color: #444;
}

.twm-tag-checkbox input:checked + label {
    color: #FF385C;
    font-weight: 600;
}

/* Count badge */
.twm-tag-count {
    background: #F0F0F0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

/* ========================================
   ACTIVE FILTERS DISPLAY
======================================== */

.twm-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background: #FFF1F3;
    border-radius: 12px;
    border-left: 4px solid #FF385C;
}

.twm-active-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: #FF385C;
    margin-right: 8px;
}

.twm-active-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.twm-active-filter-remove {
    background: #FF385C;
    color: white;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.twm-active-filter-remove:hover {
    background: #E31C5F;
    transform: scale(1.1);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .twm-tags-filter-bar {
        padding: 16px;
    }
    
    .twm-tags-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    
    .twm-tags-cloud {
        padding: 20px;
    }
    
    .twm-tag-cloud-item {
        font-size: 12px;
        padding: 8px 14px;
    }
}
