/**
 * Taxonomy System CSS
 * 
 * Styles for the tagging system including scene tags and performer tags
 */

/* =============================================================================
   TAG CONTAINERS
   ============================================================================= */

.scene-tags-container,
.performer-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.scene-direct-tags,
.scene-inherited-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 5px 0;
}

.tags-label {
    font-weight: 600;
    color: #ff69b4;
    margin-right: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================================================
   TAG STYLES
   ============================================================================= */

.scene-tag,
.performer-tag {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    margin: 2px;
}

.scene-tag:hover,
.performer-tag:hover {
    background: linear-gradient(135deg, #c44569 0%, #ff6b9d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.scene-tag:active,
.performer-tag:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 105, 180, 0.3);
}

/* Inherited tags styling */
.scene-tag.inherited {
    background: linear-gradient(135deg, #00bfff, #0080ff);
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 191, 255, 0.3);
}

.scene-tag.inherited:hover {
    background: linear-gradient(135deg, #0080ff, #00bfff);
    box-shadow: 0 4px 8px rgba(0, 191, 255, 0.4);
}

/* Active state for clicked tags */
.scene-tag.active,
.performer-tag.active {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.5);
    animation: tagPulse 0.3s ease;
}

@keyframes tagPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

/* =============================================================================
   TAG SEARCH
   ============================================================================= */

.tag-search-container {
    margin: 15px 0;
}

.tag-search-input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 2px solid #ff69b4;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tag-search-input:focus {
    outline: none;
    border-color: #ff1493;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
    background: white;
}

.tag-search-input::placeholder {
    color: #999;
    font-style: italic;
}

/* =============================================================================
   TAG FILTERING
   ============================================================================= */

.tag-filter-container {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.tag-filter-label {
    display: block;
    margin-bottom: 8px;
    color: #ff69b4;
    font-weight: 600;
    font-size: 0.9em;
}

.tag-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-filter-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-filter-option input[type="checkbox"] {
    accent-color: #ff69b4;
}

.tag-filter-option label {
    font-size: 0.8em;
    color: white;
    cursor: pointer;
}

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

@media (max-width: 768px) {
    .scene-tags-container,
    .performer-tags-container {
        gap: 6px;
        margin: 8px 0;
    }
    
    .scene-tag,
    .performer-tag {
        padding: 3px 10px;
        font-size: 0.75em;
    }
    
    .tags-label {
        font-size: 0.8em;
        margin-right: 6px;
    }
    
    .scene-direct-tags,
    .scene-inherited-tags {
        gap: 6px;
        margin: 4px 0;
    }
    
    .tag-search-input {
        max-width: 100%;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .scene-tags-container,
    .performer-tags-container {
        gap: 4px;
        margin: 6px 0;
    }
    
    .scene-tag,
    .performer-tag {
        padding: 2px 8px;
        font-size: 0.7em;
    }
    
    .tags-label {
        font-size: 0.75em;
        margin-right: 4px;
    }
    
    .tag-filter-options {
        gap: 8px;
    }
    
    .tag-filter-option label {
        font-size: 0.75em;
    }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

.scene-tag,
.performer-tag {
    animation: tagFadeIn 0.3s ease;
}

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

/* Staggered animation for multiple tags */
.scene-tags-container .scene-tag:nth-child(1) { animation-delay: 0.1s; }
.scene-tags-container .scene-tag:nth-child(2) { animation-delay: 0.2s; }
.scene-tags-container .scene-tag:nth-child(3) { animation-delay: 0.3s; }
.scene-tags-container .scene-tag:nth-child(4) { animation-delay: 0.4s; }
.scene-tags-container .scene-tag:nth-child(5) { animation-delay: 0.5s; }

/* =============================================================================
   DARK THEME SUPPORT
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    .tag-search-input {
        background: rgba(0, 0, 0, 0.8);
        color: white;
        border-color: #ff69b4;
    }
    
    .tag-search-input::placeholder {
        color: #ccc;
    }
    
    .tag-filter-container {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 105, 180, 0.5);
    }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

.scene-tag:focus,
.performer-tag:focus {
    outline: 2px solid #ff1493;
    outline-offset: 2px;
}

.tag-search-input:focus {
    outline: 2px solid #ff1493;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
