/**
 * SEO Fury Migration Wizard Styles
 */

/* Overlay */
.sfmw-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
}

/* Modal */
.sfmw-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    max-width: 90vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 100001;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

/* Header */
.sfmw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.sfmw-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
}

.sfmw-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94A3B8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s;
}

.sfmw-close:hover {
    background: #F1F5F9;
    color: #475569;
}

/* Steps indicator */
.sfmw-steps {
    display: flex;
    padding: 0;
    border-bottom: 1px solid #E2E8F0;
    background: #FAFBFC;
}

.sfmw-step {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    color: #94A3B8;
    text-align: center;
    position: relative;
    font-weight: 500;
}

.sfmw-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
    transition: all 0.2s;
}

.sfmw-step-active {
    color: #6366F1;
}

.sfmw-step-active .sfmw-step-num {
    background: #6366F1;
    color: #fff;
}

.sfmw-step-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #6366F1;
}

.sfmw-step-done {
    color: #10B981;
}

.sfmw-step-done .sfmw-step-num {
    background: #10B981;
    color: #fff;
}

/* Body */
.sfmw-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 160px);
}

/* Loading */
.sfmw-loading {
    text-align: center;
    padding: 40px 20px;
    color: #64748B;
    font-size: 14px;
}

.sfmw-loading .spinner {
    float: none;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

/* Empty state */
.sfmw-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748B;
}

.sfmw-empty p {
    margin: 0;
    font-size: 15px;
}

/* Error */
.sfmw-error {
    text-align: center;
    padding: 40px 20px;
    color: #EF4444;
    font-size: 14px;
}

/* Description */
.sfmw-desc {
    margin: 0 0 16px;
    color: #64748B;
    font-size: 14px;
}

/* Plugin list */
.sfmw-plugin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.sfmw-plugin-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.sfmw-plugin-card:hover {
    border-color: #C7D2FE;
    background: #F5F3FF;
}

.sfmw-plugin-card.sfmw-selected {
    border-color: #6366F1;
    background: #EEF2FF;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sfmw-plugin-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.sfmw-plugin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sfmw-plugin-info strong {
    font-size: 14px;
    color: #1E293B;
}

.sfmw-plugin-count {
    font-size: 12px;
    color: #94A3B8;
}

.sfmw-plugin-check {
    display: none;
    font-size: 18px;
    color: #6366F1;
    font-weight: 700;
}

.sfmw-selected .sfmw-plugin-check {
    display: block;
}

/* Settings toggle */
.sfmw-settings-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.sfmw-settings-label input {
    margin: 0;
}

/* Notice */
.sfmw-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 6px;
    font-size: 12px;
    color: #166534;
    margin-bottom: 20px;
}

/* Actions */
.sfmw-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sfmw-actions .button-primary {
    background: #6366F1 !important;
    border-color: #6366F1 !important;
    color: #fff !important;
    padding: 6px 20px !important;
    height: auto !important;
    font-size: 13px !important;
}

.sfmw-actions .button-primary:hover {
    background: #4F46E5 !important;
    border-color: #4F46E5 !important;
}

.sfmw-actions .button-primary:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* =================== */
/* Step 2: Progress    */
/* =================== */

.sfmw-progress-wrap {
    /* no extra styling needed */
}

.sfmw-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sfmw-progress-plugin {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
}

.sfmw-progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: #6366F1;
}

.sfmw-progress-bar {
    width: 100%;
    height: 10px;
    background: #E2E8F0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.sfmw-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366F1, #818CF8);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.sfmw-progress-stats {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 16px;
}

/* Log */
.sfmw-log {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 12px;
}

.sfmw-log-entry {
    padding: 3px 0;
    color: #475569;
    line-height: 1.5;
}

.sfmw-log-entry:not(:last-child) {
    border-bottom: 1px solid #F1F5F9;
}

/* =================== */
/* Step 3: Results     */
/* =================== */

.sfmw-results {
    text-align: center;
    padding: 10px 0;
}

.sfmw-results-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.sfmw-results h3 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #1E293B;
}

.sfmw-results-plugin {
    color: #64748B;
    margin: 0 0 24px;
    font-size: 14px;
}

.sfmw-results-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
}

.sfmw-result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sfmw-result-num {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.sfmw-result-migrated {
    color: #10B981;
}

.sfmw-result-skipped {
    color: #F59E0B;
}

.sfmw-result-errors {
    color: #EF4444;
}

.sfmw-result-label {
    font-size: 12px;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Migration card in General settings */
.sfmw-settings-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--sf-primary-light, #F5F3FF);
    border: 1px solid var(--sf-gray-200, #DDD6FE);
    border-radius: 8px;
}

.sfmw-settings-card-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.sfmw-settings-card-info {
    flex: 1;
}

.sfmw-settings-card-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--sf-gray-900, #1E293B);
}

.sfmw-settings-card-info p {
    margin: 0;
    font-size: 12px;
    color: var(--sf-gray-500, #64748B);
}

.sfmw-settings-card .button {
    flex-shrink: 0;
}

/* =================== */
/* Deactivation block  */
/* =================== */

.sfmw-deactivate-section {
    text-align: center;
    padding: 20px 24px;
    margin: 0 0 20px;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 10px;
}

.sfmw-deactivate-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.sfmw-deactivate-text {
    margin: 0 0 14px;
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
}

.sfmw-btn-deactivate {
    background: #F59E0B !important;
    border-color: #D97706 !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 6px 20px !important;
    height: auto !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
}

.sfmw-btn-deactivate:hover {
    background: #D97706 !important;
    border-color: #B45309 !important;
}

.sfmw-btn-deactivate:disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
}

.sfmw-deactivate-status {
    margin-top: 10px;
    font-size: 13px;
}

.sfmw-deactivate-success {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
    padding: 8px 0;
}
