/**
 * CAISSA Cloud Sync - UI Styles
 *
 * Styling for the sync indicator in the Library panel
 */

/* Sync Indicator Container */
.library-sync-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.library-sync-indicator i {
    font-size: 14px;
}

.library-sync-indicator span {
    white-space: nowrap;
}

/* Status Variants */

/* Idle - synced successfully */
.library-sync-indicator.sync-idle {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}

.library-sync-indicator.sync-idle:hover {
    background-color: rgba(34, 197, 94, 0.15);
}

/* Syncing - operation in progress */
.library-sync-indicator.sync-syncing {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.library-sync-indicator.sync-syncing i {
    animation: sync-spin 1s linear infinite;
}

/* Error - sync failed */
.library-sync-indicator.sync-error {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    cursor: pointer;
}

.library-sync-indicator.sync-error:hover {
    background-color: rgba(239, 68, 68, 0.15);
}

/* Disabled - sync turned off */
.library-sync-indicator.sync-disabled {
    color: #94a3b8;
    background-color: rgba(148, 163, 184, 0.1);
}

/* Sync Now Button */
#librarySyncNow {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#librarySyncNow:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

#librarySyncNow:active:not(:disabled) {
    transform: translateY(1px);
}

#librarySyncNow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#librarySyncNow i {
    font-size: 12px;
}

/* Sync Spinner Animation */
@keyframes sync-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .library-sync-indicator span {
        display: none; /* Show icon only on mobile */
    }

    .library-sync-indicator {
        padding: 6px 8px;
    }

    #librarySyncNow {
        padding: 6px 10px;
        font-size: 11px;
    }
}
