@use '../globals' as *;

/**
 * Migration Page Styles
 */

.mpz-migration-page {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;

    .mpz-page-header {
        margin-bottom: 30px;

        h1 {
            font-size: 28px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #1d2327;
        }

        p {
            font-size: 16px;
            color: #50575e;
            margin: 0;
        }
    }

    // Step Indicator
    .mpz-step-indicator {
        display: flex;
        justify-content: space-between;
        margin-bottom: 40px;
        position: relative;
        z-index: 1;

        &::before {
            content: '';
            position: absolute;
            top: 15px;
            left: 0;
            right: 0;
            height: 2px;
            background: #dcdcde;
            z-index: -1;
        }

        .mpz-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            background: #f0f0f1; // Match WP background to hide line behind number
            padding: 0 10px;

            &.active {
                .mpz-step-number {
                    background: #2271b1;
                    color: #fff;
                    border-color: #2271b1;
                }

                .mpz-step-label {
                    color: #1d2327;
                    font-weight: 600;
                }
            }

            &.completed {
                .mpz-step-number {
                    background: #00a32a;
                    color: #fff;
                    border-color: #00a32a;
                }

                .mpz-step-label {
                    color: #00a32a;
                }
            }

            .mpz-step-number {
                width: 32px;
                height: 32px;
                border: 2px solid #dcdcde;
                border-radius: 50%;
                background: #fff;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 600;
                margin-bottom: 8px;
                transition: all 0.3s ease;
            }

            .mpz-step-label {
                font-size: 13px;
                color: #646970;
                text-align: center;
            }
        }
    }

    // Content Area
    .mpz-migration-content {
        background: #fff;
        border: 1px solid #c3c4c7;
        box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
        padding: 0; // Padding handled by Card component usually, or clean container
        border-radius: 4px;
        min-height: 400px;

        // If we use Card component inside, remove border/bg from here or adjust
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;

        .mpz-card {
            margin-bottom: 0;
        }
    }

    // Check List (Step 1)
    .mpz-check-list {
        margin: 0 0 20px 0;
        padding: 0;
        list-style: none;

        .mpz-check-item {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            border-bottom: 1px solid #f0f0f1;

            &:last-child {
                border-bottom: none;
            }

            .dashicons {
                font-size: 20px;
                margin-right: 15px;
                width: 20px;
                height: 20px;
            }

            .mpz-check-message {
                font-size: 14px;
                color: #1d2327;
            }

            &.failed {
                background-color: #fcf0f1;
            }
        }
    }

    // Actions Footer
    .mpz-actions {
        margin-top: 20px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 15px;
        padding-top: 20px;
        border-top: 1px solid #f0f0f1;

        .mpz-skip-link {
            color: #d63638;

            &:hover {
                color: #a32b2e;
            }
        }
    }

    // Loading State
    .mpz-loading-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 0;

        .spinner {
            float: none;
            margin: 0 0 15px 0;
            width: 40px;
            height: 40px;
            background-size: 40px;
            opacity: 0.7;
        }

        p {
            font-size: 16px;
            color: #646970;
        }
    }

    // Migration Progress (Step 3)
    .mpz-migration-progress {
        padding: 20px 0;
    }

    // Success Message (Step 5)
    .mpz-success-message {
        text-align: center;
        padding: 40px 0;

        .dashicons {
            margin-bottom: 20px;
        }

        h2 {
            font-size: 24px;
            margin-bottom: 10px;
            color: #1d2327;
        }

        p {
            font-size: 16px;
            color: #646970;
        }
    }
}
