/* Sync Modal Styles */
.sync-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

.sync-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 8px;
    min-width: 600px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sync-modal-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

/* Progress Bar */
.sync-progress {
    margin-bottom: 20px;
}

.sync-progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #ddd;
}

.sync-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.4s ease;
    width: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.sync-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* Status Information */
.sync-status {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.sync-status p {
    margin: 8px 0;
    font-size: 14px;
    color: #444;
}

.sync-status strong {
    display: inline-block;
    min-width: 120px;
    color: #333;
}

.sync-status span {
    color: #4CAF50;
    font-weight: 600;
}

/* Logs Display */
.sync-logs {
    max-height: 250px;
    overflow-y: auto;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid #333;
}

.sync-logs::-webkit-scrollbar {
    width: 8px;
}

.sync-logs::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.sync-logs::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.sync-logs::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.sync-log-entry {
    padding: 4px 0;
    border-bottom: 1px solid #2d2d2d;
}

.sync-log-entry:last-child {
    border-bottom: none;
}

.sync-log-time {
    color: #888;
    margin-right: 10px;
}

.sync-log-success {
    color: #4CAF50;
}

.sync-log-error {
    color: #f44336;
}

.sync-log-warning {
    color: #ff9800;
}

.sync-log-info {
    color: #2196F3;
}

/* Action Buttons */
.sync-actions {
    text-align: right;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.sync-actions button {
    margin-left: 10px;
    padding: 8px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sync-btn-stop {
    background: #f44336;
    color: white;
}

.sync-btn-stop:hover {
    background: #d32f2f;
}

.sync-btn-close {
    background: #2196F3;
    color: white;
}

.sync-btn-close:hover {
    background: #1976D2;
}

.sync-btn-export {
    background: #666;
    color: white;
}

.sync-btn-export:hover {
    background: #555;
}

/* Summary Stats */
.sync-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.sync-stat {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #ddd;
}

.sync-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.sync-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* Completion State */
.sync-completed .sync-progress-fill {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.sync-error .sync-progress-fill {
    background: linear-gradient(90deg, #f44336, #e57373);
}

/* Animation for sync icon */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sync-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sync-modal-container {
        min-width: 90%;
        max-width: 95%;
        padding: 15px;
    }
    
    .sync-summary {
        grid-template-columns: 1fr;
    }
}
