/* IZIII Synchro Frontend Styles */

/* Message Modal */
.iziii-dispo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.iziii-dispo-modal-overlay.success {
    background-color: rgba(40, 167, 69, 0.1);
}

.iziii-dispo-modal-overlay.error {
    background-color: rgba(220, 53, 69, 0.1);
}

.iziii-dispo-modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-in-out;
    border-left: 6px solid #28a745;
}

.iziii-dispo-modal-overlay.error .iziii-dispo-modal {
    border-left-color: #dc3545;
}

.iziii-dispo-modal-content {
    padding: 30px 25px;
    text-align: center;
}

.iziii-dispo-modal-content p {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.iziii-dispo-modal-overlay.success .iziii-dispo-modal-content p {
    color: #155724;
}

.iziii-dispo-modal-overlay.error .iziii-dispo-modal-content p {
    color: #721c24;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.iziii-dispo-modal-overlay.hide {
    animation: fadeOut 0.3s ease-in-out forwards;
}

.iziii-synchro-page-wrapper {
    padding: 20px 0;
}

.iziii-synchro-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.iziii-synchro-products-section {
    margin-top: 40px;
}

.iziii-synchro-products-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* Search Box */
.products-search-box {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-search-box label {
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.products-search-box .search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.products-search-box .search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Status Filter Box */
.products-filter-box {
    margin-bottom: 20px;
    padding: 12px 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.products-filter-box > label:first-child {
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.products-filter-box .filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
    color: #333;
    margin: 0;
}

.products-filter-box .filter-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.products-filter-box .filter-checkbox-label:hover {
    color: #0073aa;
}

.products-selector-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.products-selector-actions .button {
    padding: 8px 16px;
}

.iziii-synchro-products-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.iziii-synchro-products-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #0073aa;
}

.iziii-synchro-products-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.iziii-synchro-products-table thead th.checkbox-col {
    width: 50px;
    text-align: center;
}

.iziii-synchro-products-table thead th.sku-col {
    width: 150px;
}

.iziii-synchro-products-table thead th.name-col {
    flex: 1;
}

.iziii-synchro-products-table thead th.status-col {
    width: 80px;
    text-align: center;
}

.iziii-synchro-products-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.iziii-synchro-products-table tbody tr:hover {
    background-color: #f9f9f9;
}

.iziii-synchro-products-table tbody tr.product-row td {
    padding: 12px 15px;
    vertical-align: middle;
}

.iziii-synchro-products-table td.checkbox-col {
    text-align: center;
}

.iziii-synchro-products-table td.checkbox-col input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.iziii-synchro-products-table td.status-col {
    text-align: center;
}

.iziii-synchro-products-table td.status-col input[type="checkbox"] {
    cursor: not-allowed;
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.iziii-synchro-products-table td.sku-col {
    font-family: monospace;
    font-weight: 500;
    color: #0073aa;
}

.iziii-synchro-products-table td.name-col {
    color: #333;
}

.iziii-synchro-products-table .no-products {
    text-align: center;
    padding: 30px 15px !important;
    color: #666;
    font-style: italic;
}

.products-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

/* Action Buttons */

.iziii-synchro-action-buttons {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    gap: 10px;
    animation: slideInUp 0.3s ease-out;
}

.iziii-synchro-action-buttons .button {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.iziii-synchro-action-buttons .button-primary {
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

.iziii-synchro-action-buttons .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.iziii-synchro-action-buttons .button-primary:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .iziii-synchro-page-container {
        padding: 0 10px;
    }

    .iziii-synchro-products-table {
        font-size: 14px;
    }

    .iziii-synchro-products-table thead th,
    .iziii-synchro-products-table tbody td {
        padding: 8px 10px;
    }

    .products-selector-actions {
        flex-wrap: wrap;
    }
}

/* Results Styles */

.iziii-synchro-results-section {
    margin-top: 40px;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-summary {
    background: #f9f9f9;
    border-left: 5px solid #0073aa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.results-summary.success {
    border-left-color: #008000;
}

.results-summary.partial {
    border-left-color: #ff6600;
}

.results-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
}

.stat.success {
    border-top: 3px solid #008000;
}

.stat.failed {
    border-top: 3px solid #dc3545;
}

.stat.total {
    border-top: 3px solid #0073aa;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #666;
}

.results-details {
    margin-top: 30px;
}

.results-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #0073aa;
}

.results-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.results-table tbody tr {
    border-bottom: 1px solid #eee;
}

.results-table tbody tr.result-success {
    background: #f0fff4;
}

.results-table tbody tr.result-error {
    background: #fff5f5;
}

.results-table tbody tr:hover {
    background: #f9f9f9;
}

.results-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.status-badge.status-success {
    background: #008000;
    color: white;
}

.status-badge.status-error {
    background: #dc3545;
    color: white;
}

@media (max-width: 768px) {
    .results-stats {
        grid-template-columns: 1fr;
    }

    .results-table {
        font-size: 12px;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 8px 10px;
    }

    .product-col, .message-col {
        display: none;
    }
}

/* Real-time progress styles */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.progress-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-container h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.progress-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
}

.progress-container .result-row {
    animation: fadeIn 0.3s ease-in;
}

.result-row.success {
    background-color: #f0f8f4;
    border-left: 4px solid #28a745;
}

.result-row.error {
    background-color: #f8f1f0;
    border-left: 4px solid #dc3545;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.success {
    background-color: #28a745;
    color: #fff;
}

.status-badge.error {
    background-color: #dc3545;
    color: #fff;
}

.iziii-synchro-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.iziii-synchro-results-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #0073aa;
}

.iziii-synchro-results-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border: 1px solid #ddd;
}

.iziii-synchro-results-table tbody td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.product-cell {
    font-weight: 500;
    color: #333;
}

.site-cell {
    color: #666;
}

.status-cell {
    text-align: center;
}

.message-cell {
    color: #666;
    font-size: 14px;
}

.iziii-synchro-action-buttons {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    border-top: 1px solid #ddd;
}

/* Visibility Badge */
.visibility-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.visibility-badge.visible {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.visibility-badge.hidden {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}
