/* Collection Sift Interface Styles */

/* Main Container */
.collection-sift-container {
    min-height: 100vh;
    background: #f8fafc;
    padding-bottom: 120px; /* Space for bottom drawer */
}

/* Header */
.collection-header {
    background: linear-gradient(135deg, #8b9d83 0%, #7a8b72 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.collection-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.collection-header h1 i {
    color: rgba(255, 255, 255, 0.9);
}

.collection-subtitle {
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.collection-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.collection-header-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.collection-header-actions .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.collection-header-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.collection-header-actions .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.collection-header-actions .btn-secondary:hover,
.collection-header-actions .btn-secondary.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Main Content Layout */
.collection-main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 2rem;
    min-height: 600px;
}

/* Filters Sidebar */
.collection-filters-sidebar {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
    transition: all 0.3s ease;
}

.filters-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-filters {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-close-filters:hover {
    background: #f1f5f9;
    color: #2d3748;
}

.filters-content {
    padding: 1.5rem;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.filter-group .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-group .form-control:focus {
    outline: none;
    border-color: #8b9d83;
    box-shadow: 0 0 0 3px rgba(139, 157, 131, 0.1);
}

/* Date Range */
.date-range-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.date-separator {
    color: #64748b;
    font-weight: 500;
}

.date-range-slider {
    margin-top: 1rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8b9d83;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8b9d83;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.filter-checkbox:hover {
    background: #f8fafc;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    position: relative;
    transition: all 0.2s ease;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #8b9d83;
    border-color: #8b9d83;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Speaker Filters */
.speaker-filters {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

/* Tags Filter */
.tags-filter {
    margin-top: 0.5rem;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag-chip {
    background: rgba(139, 157, 131, 0.1);
    color: #2d3748;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(139, 157, 131, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-chip:hover,
.tag-chip.selected {
    background: #8b9d83;
    color: white;
    border-color: #8b9d83;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.filter-actions .btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Timeline */
.collection-timeline {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.timeline-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-title h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
}

.entry-count {
    color: #64748b;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.timeline-actions {
    display: flex;
    gap: 0.5rem;
}

.timeline-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
}

.timeline-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
}

/* Entry Cards */
.entry-card {
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.entry-card:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.entry-card.selected {
    border-color: #8b9d83;
    background: rgba(139, 157, 131, 0.05);
}

.entry-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.entry-checkbox {
    margin-top: 0.25rem;
}

.entry-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8b9d83;
}

.entry-title {
    flex: 1;
}

.entry-title h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
    font-size: 0.85rem;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.entry-meta i {
    color: #8b9d83;
    font-size: 0.8rem;
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-entry-action {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-entry-action:hover {
    background: #f9fafb;
    border-color: #8b9d83;
    color: #8b9d83;
}

.entry-preview {
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.entry-tag {
    background: rgba(139, 157, 131, 0.1);
    color: #2d3748;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(139, 157, 131, 0.3);
}

/* Inspector Panel */
.collection-inspector {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
    transition: all 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
}

.collection-inspector.open {
    transform: translateX(0);
    opacity: 1;
}

.inspector-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inspector-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-inspector {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-close-inspector:hover {
    background: #f1f5f9;
    color: #2d3748;
}

.inspector-content {
    padding: 1.5rem;
    min-height: 200px;
}

.inspector-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.inspector-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* Bottom Collection Drawer */
.collection-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateY(calc(100% - 60px));
}

.collection-drawer.open {
    transform: translateY(0);
}

.drawer-header {
    padding: 1rem 2rem;
    background: #8b9d83;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.drawer-header:hover {
    background: #7a8b72;
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.drawer-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.9rem;
}

.drawer-toggle {
    transition: transform 0.3s ease;
}

.collection-drawer.open .drawer-toggle {
    transform: rotate(180deg);
}

.drawer-content {
    padding: 1.5rem 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.drawer-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
}

.token-meter {
    position: relative;
    width: 100px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.token-progress {
    height: 100%;
    background: linear-gradient(90deg, #8b9d83 0%, #f59e0b 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.token-limit {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.7rem;
    color: #64748b;
}

.drawer-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.drawer-actions .btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.drawer-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drawer-entries {
    max-height: 200px;
    overflow-y: auto;
}

.drawer-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.drawer-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.drawer-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.drawer-entry-info {
    flex: 1;
}

.drawer-entry-title {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.drawer-entry-speaker {
    font-size: 0.8rem;
    color: #64748b;
}

.btn-remove-entry {
    background: none;
    border: none;
    color: #f56565;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn-remove-entry:hover {
    background: #fee;
}

/* Loading and Empty States */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    font-size: 1.1rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: #8b9d83;
    margin-bottom: 1rem;
    display: block;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

/* Infinite Scroll Trigger */
.infinite-scroll-trigger {
    height: 20px;
    margin: 1rem 0;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .collection-main-content {
        grid-template-columns: 250px 1fr 300px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .collection-main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .collection-filters-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
    }
    
    .collection-filters-sidebar.open {
        left: 0;
    }
    
    .collection-inspector {
        position: fixed;
        top: 0;
        right: -350px;
        width: 350px;
        height: 100vh;
        z-index: 1001;
        transition: right 0.3s ease;
    }
    
    .collection-inspector.open {
        right: 0;
    }
}

@media (max-width: 768px) {
    .collection-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .collection-header h1 {
        font-size: 2rem;
    }
    
    .collection-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .collection-header-actions .btn {
        width: 100%;
    }
    
    .collection-main-content {
        padding: 0 1rem;
    }
    
    .drawer-content {
        padding: 1rem;
    }
    
    .drawer-actions {
        flex-direction: column;
    }
    
    .entry-card {
        padding: 1rem;
    }
    
    .entry-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animation Classes */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.entry-card {
    animation: slideInFromLeft 0.3s ease;
}

.collection-inspector.open {
    animation: slideInFromRight 0.3s ease;
}
