/* Sync Queue Panel Styles - Add these to the end of styles.css */

/* Last Sync Time */
#last-sync-time {
    position: fixed;
    top: 20px;
    right: 140px;
    font-size: 0.7rem;
    color: #666;
    z-index: 110;
    font-family: monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Sync Queue Panel */
.sync-queue-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--secondary);
    border-left: 1px solid var(--border);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    z-index: 300;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sync-queue-panel.active {
    right: 0;
}

.queue-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--accent);
}

.close-queue-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-queue-btn:hover {
    background: rgba(255,255,255,0.1);
}

.queue-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.queue-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: monospace;
}

.queue-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queue-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.2s;
}

.queue-item.pending {
    border-left: 3px solid #4285f4;
}

.queue-item.processing {
    border-left: 3px solid #fbbc04;
    animation: pulse 2s ease-in-out infinite;
}

.queue-item.failed {
    border-left: 3px solid var(--red-accent);
}

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

.queue-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.queue-item-type {
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.queue-item-status {
    font-size: 0.7rem;
    color: #888;
    padding: 2px 8px;
    background: #222;
    border-radius: 10px;
}

.queue-item-info {
    margin-bottom: 8px;
}

.queue-item-file {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item-time {
    font-size: 0.7rem;
    color: #666;
    font-family: monospace;
}

.queue-item-error {
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #ff9999;
}

.queue-item-attempts {
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
}

.btn-retry {
    margin-top: 10px;
    background: var(--red-accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-retry:hover {
    transform: scale(1.05);
}

.btn-retry:active {
    transform: scale(0.98);
}

.queue-actions {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.queue-actions .btn {
    flex: 1;
    margin-bottom: 0;
}

/* Enhanced Sync Indicator */
#sync-indicator.syncing .material-symbols-outlined {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#sync-indicator.offline {
    opacity: 0.5;
}

#sync-indicator.error {
    background: rgba(255, 51, 51, 0.2);
    border-color: var(--red-accent);
}

#sync-indicator.error .material-symbols-outlined {
    color: var(--red-accent);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #last-sync-time {
        right: 110px;
        font-size: 0.65rem;
    }
    
    .sync-queue-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .queue-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .queue-actions {
        flex-direction: column;
    }
}
