/**
 * ASIN Sync CSS for miniOrange WooCommerce Amazon Sync Plugin
 * Premium plan feature styling for bulk ASIN synchronization
 *
 * @package    MOMCS_Sync
 * @since      1.0.0
 */

/* ==========================================================================
   ASIN Sync Button
   ========================================================================== */

#momcs-sync-asin-btn {
    background: #ea580c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    display: inline-block;
    vertical-align: middle;
}

#momcs-sync-asin-btn:hover {
    background: #c2410c;
    color: white;
}

#momcs-sync-asin-btn:focus {
    background: #c2410c;
    color: white;
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px #ea580c;
    outline: none;
}

#momcs-sync-asin-btn:disabled {
    background: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* ==========================================================================
   Progress Display Container
   ========================================================================== */

#momcs-asin-sync-progress {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.momcs-asin-sync-status h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

/* ==========================================================================
   Channel Progress Items
   ========================================================================== */

.momcs-channel-progress {
    margin-bottom: 15px;
    padding: 12px;
    background: #f6f7f7;
    border-radius: 4px;
    border-left: 4px solid #ea580c;
}

.momcs-channel-progress:last-child {
    margin-bottom: 0;
}

.momcs-channel-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #1d2327;
}

.momcs-channel-info strong {
    font-weight: 600;
}

.momcs-progress-percentage {
    font-weight: 600;
    color: #ea580c;
    font-size: 13px;
}

/* ==========================================================================
   Progress Bars
   ========================================================================== */

.momcs-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.momcs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ea580c 0%, #c2410c 100%);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
    min-width: 2px;
}

/* Progress fill colors for different statuses */
.momcs-channel-progress[data-status="completed"] .momcs-progress-fill {
    background: linear-gradient(90deg, #46b450 0%, #2e7d2f 100%);
}

.momcs-channel-progress[data-status="error"] .momcs-progress-fill {
    background: linear-gradient(90deg, #dc3232 0%, #a02622 100%);
}

.momcs-channel-progress[data-status="paused"] .momcs-progress-fill {
    background: linear-gradient(90deg, #ffb900 0%, #cc9300 100%);
}

/* ==========================================================================
   Overall Status
   ========================================================================== */

.momcs-overall-status {
    margin: 15px 0 0 0;
    padding: 10px;
    background: #f0f6fc;
    border-radius: 4px;
    color: #ea580c;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid #ea580c;
}

/* ==========================================================================
   Control Buttons
   ========================================================================== */

.momcs-asin-sync-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.momcs-asin-pause-btn,
.momcs-asin-resume-btn,
.momcs-asin-stop-btn {
    padding: 6px 12px;
    margin-right: 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid;
}

.momcs-asin-pause-btn {
    background: #ffb900;
    color: white;
    border-color: #ffb900;
}

.momcs-asin-pause-btn:hover,
.momcs-asin-pause-btn:focus {
    background: #e6a600;
    border-color: #e6a600;
    color: white;
}

.momcs-asin-resume-btn {
    background: #46b450;
    color: white;
    border-color: #46b450;
}

.momcs-asin-resume-btn:hover,
.momcs-asin-resume-btn:focus {
    background: #2e7d2f;
    border-color: #2e7d2f;
    color: white;
}

.momcs-asin-stop-btn {
    background: #dc3232;
    color: white;
    border-color: #dc3232;
}

.momcs-asin-stop-btn:hover,
.momcs-asin-stop-btn:focus {
    background: #a02622;
    border-color: #a02622;
    color: white;
}

/* ==========================================================================
   Error and Success Messages
   ========================================================================== */

.momcs-asin-sync-error {
    background: #fcf2f2;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 15px;
    color: #a02622;
}

.momcs-asin-sync-error p {
    margin: 0;
    display: flex;
    align-items: center;
}

.momcs-asin-sync-error .dashicons {
    margin-right: 8px;
    font-size: 16px;
}

.momcs-asin-sync-success {
    background: #f0f9f0;
    border: 1px solid #46b450;
    border-radius: 4px;
    padding: 15px;
    color: #2e7d2f;
}

.momcs-asin-sync-success p {
    margin: 0;
    display: flex;
    align-items: center;
}

.momcs-asin-sync-success .dashicons {
    margin-right: 8px;
    font-size: 16px;
}

/* ==========================================================================
   Premium Marketplace ASIN Table (Product Edit Page)
   ========================================================================== */

.momcs-asin-marketplace-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.momcs-asin-marketplace-table th,
.momcs-asin-marketplace-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.momcs-asin-marketplace-table th {
    background: #f6f7f7;
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
}

.momcs-asin-marketplace-table td {
    color: #50575e;
    font-size: 14px;
}

.momcs-asin-marketplace-table input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    color: #2c3338;
}

.momcs-asin-marketplace-table input[type="text"]:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 1px #ea580c;
    outline: none;
}

.momcs-asin-marketplace-table input[type="text"]:disabled {
    background: #f6f7f7;
    color: #8c8f94;
    cursor: not-allowed;
}

/* ==========================================================================
   Channel Selection Modal Enhancements for ASIN Sync
   ========================================================================== */

.momcs-sync-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
}

.momcs-sync-channel-item label {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.momcs-sync-channel-item input[type="checkbox"],
.momcs-sync-channel-item input[type="radio"] {
    margin-right: 10px;
}

.momcs-sync-channel-item img {
    margin-right: 8px;
    border-radius: 2px;
}

.momcs-sync-channel-item small {
    margin-left: 5px;
    color: #8c8f94;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 782px) {
    #momcs-sync-asin-btn {
        margin: 5px 0;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .momcs-channel-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .momcs-progress-percentage {
        margin-top: 5px;
        align-self: flex-end;
    }
    
    .momcs-asin-sync-controls {
        text-align: center;
    }
    
    .momcs-asin-pause-btn,
    .momcs-asin-resume-btn,
    .momcs-asin-stop-btn {
        margin: 5px;
        min-width: 100px;
    }
}

/* ==========================================================================
   Loading States and Animations
   ========================================================================== */

.momcs-channel-progress[data-status="processing"] .momcs-progress-fill {
    animation: momcs-progress-pulse 2s ease-in-out infinite;
}

@keyframes momcs-progress-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Spinner for loading states */
.momcs-asin-sync-loading {
    display: inline-flex;
    align-items: center;
}

.momcs-asin-sync-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #c3c4c7;
    border-top-color: #ea580c;
    border-radius: 50%;
    margin-right: 8px;
    animation: momcs-spinner 1s linear infinite;
}

@keyframes momcs-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   High Contrast Mode Support
   ========================================================================== */

@media (prefers-contrast: high) {
    #momcs-sync-asin-btn {
        border: 2px solid;
    }
    
    .momcs-progress-bar {
        border: 1px solid;
    }
    
    .momcs-channel-progress {
        border: 1px solid;
    }
}