/* Media Queue Styles */

.queue-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.queue-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.queue-header h1 {
    margin: 0 0 1.5rem 0;
    font-size: 2rem;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-select {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.filter-select option {
    background: #333;
}

.action-controls {
    display: flex;
    gap: 1rem;
}

/* Stats Cards */
.queue-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card.pending {
    border-left: 4px solid #ffc107;
}

.stat-card.processing {
    border-left: 4px solid #2196f3;
}

.stat-card.completed {
    border-left: 4px solid #4caf50;
}

.stat-card.memories {
    border-left: 4px solid #9c27b0;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Timeline */
.queue-timeline {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.timeline-header h2 {
    margin: 0;
    color: #333;
}

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

.sort-btn {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-btn:hover {
    background: #e0e0e0;
}

.sort-btn.active {
    background: #667eea;
    color: white;
}

/* Queue Items */
.queue-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.queue-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.queue-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.queue-item.processing {
    background: linear-gradient(90deg, #e3f2fd 0%, #f9f9f9 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.queue-item.completed {
    background: linear-gradient(90deg, #e8f5e9 0%, #f9f9f9 100%);
}

.queue-item.error {
    background: linear-gradient(90deg, #ffebee 0%, #f9f9f9 100%);
}

.item-icon {
    font-size: 2.5rem;
    width: 60px;
    text-align: center;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.item-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

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

.item-progress {
    width: 150px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.item-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 120px;
}

.memory-tooltip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
    min-width: 200px;
}

.queue-item:hover .memory-tooltip {
    opacity: 1;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.tooltip-label {
    opacity: 0.8;
}

.tooltip-value {
    font-weight: bold;
}

.item-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cfe2ff;
    color: #084298;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-error {
    background: #f8d7da;
    color: #842029;
}

/* Memory Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-content.large {
    max-width: 1200px;
}

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

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.memory-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.memory-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.memory-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.memory-item {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.memory-content {
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.memory-metadata {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.metadata-tag {
    background: #e0e0e0;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}