/* AliDropship Frontend Sync Status Styles */

/* Product Sync Status Widget */
.vi-wad-product-sync-status,
.vi-wad-order-sync-status {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e1e4e8;
    border-radius: 5px;
}

.sync-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0073aa;
}

.sync-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
}

.sync-header .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Sync Info */
.sync-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item label {
    font-weight: 600;
    color: #666;
    margin: 0;
    margin-right: 8px;
}

.info-item span {
    color: #23282d;
    font-weight: 500;
}

.sync-time {
    color: #0073aa;
    font-weight: 700;
}

/* Sync Changes */
.sync-changes {
    margin: 15px 0;
    padding: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sync-changes h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
}

.changes-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.change-item {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.change-item:last-child {
    border-bottom: none;
}

.change-date {
    color: #666;
    font-style: italic;
    font-size: 12px;
}

.fields {
    color: #27ae60;
    font-weight: 600;
}

.tracking-update {
    color: #0073aa;
    font-weight: 600;
}

/* Progress Bar */
.sync-progress {
    margin-top: 15px;
}

.progress-bar {
    height: 6px;
    background: #e1e4e8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    transition: width 0.3s ease;
}

.sync-progress small {
    display: block;
    color: #999;
    font-size: 12px;
    text-align: center;
}

/* Sync Status Shortcode */
.vi-wad-sync-status-shortcode {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #f9fbfc 100%);
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sync-status-container h2 {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    color: #23282d;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.status-item {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    text-align: center;
}

.status-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.status-item .value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #0073aa;
}

.progress-container {
    margin: 20px 0;
}

.progress-container small {
    display: block;
    color: #666;
    margin-top: 6px;
    text-align: center;
    font-size: 12px;
}

/* Pending Items */
.pending-items {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
}

.pending-items h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
}

.pending-items p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .sync-info {
        grid-template-columns: 1fr;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .change-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Animation for syncing state */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.syncing {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Countdown timer specific */
.countdown {
    font-weight: 700;
    font-size: 18px;
    color: #0073aa;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .vi-wad-product-sync-status,
    .vi-wad-order-sync-status {
        background: #2a2a2a;
        border-color: #444;
    }

    .sync-header h3 {
        color: #fff;
    }

    .info-item label {
        color: #aaa;
    }

    .info-item span {
        color: #fff;
    }

    .sync-changes {
        background: #333;
        border-color: #555;
    }

    .vi-wad-sync-status-shortcode {
        background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
        border-color: #444;
    }

    .sync-status-container h2 {
        color: #fff;
    }

    .status-item {
        background: #333;
        border-color: #555;
    }

    .status-item .label {
        color: #aaa;
    }

    .pending-items {
        background: #333;
        border-left-color: #f39c12;
    }

    .pending-items h3 {
        color: #fff;
    }

    .pending-items p {
        color: #aaa;
    }
}
