/**
 * Contexa Onboarding Wizard Styles
 * Modern SaaS-style full-screen wizard
 */

/* Full-screen wrapper - hide WordPress admin */
.contexa-wizard-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    z-index: 999999 !important;
    overflow-y: auto !important;
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Hide WordPress admin elements - more aggressive selectors */
.contexa-wizard-wrapper ~ #wpcontent,
.contexa-wizard-wrapper ~ #wpfooter,
.contexa-wizard-wrapper ~ #adminmenumain,
.contexa-wizard-wrapper ~ .update-nag,
body:has(.contexa-wizard-wrapper) #wpcontent,
body:has(.contexa-wizard-wrapper) #wpfooter,
body:has(.contexa-wizard-wrapper) #adminmenumain,
body:has(.contexa-wizard-wrapper) .update-nag {
    display: none !important;
}

body:has(.contexa-wizard-wrapper) {
    overflow: hidden !important;
}

/* Wizard container */
.contexa-wizard-container {
    max-width: 700px;
    margin: 60px auto;
    padding: 20px;
}

/* Step container */
.contexa-wizard-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.contexa-wizard-step.active {
    display: block;
}

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

/* Content card */
.contexa-wizard-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 60px 80px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Typography */
.contexa-wizard-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.contexa-subtitle {
    font-size: 18px;
    color: #718096;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

/* Large icon */
.contexa-icon-large {
    font-size: 72px;
    margin-bottom: 24px;
}

/* Stats box */
.contexa-stats-box {
    background: #f7fafc;
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
}

.contexa-stats-label {
    font-size: 16px;
    color: #718096;
    margin: 0 0 20px 0;
}

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

.contexa-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contexa-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.contexa-stat-label {
    font-size: 14px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Health Score */
.contexa-health-score-container {
    margin: 40px 0;
}

.contexa-health-label {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 24px;
}

.contexa-health-score {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.contexa-score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.contexa-score-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 12;
}

.contexa-score-progress {
    fill: none;
    stroke: #48bb78;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: calc(565.48 - (565.48 * var(--score)) / 100);
    transition: stroke-dashoffset 1s ease-in-out;
}

.contexa-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.contexa-score-number {
    font-size: 56px;
    font-weight: 700;
    color: #1a202c;
}

.contexa-score-number.contexa-score-improved {
    color: #48bb78;
}

.contexa-score-total {
    font-size: 24px;
    color: #718096;
}

/* Buttons */
.contexa-wizard-btn {
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.contexa-btn-primary {
    background: #667eea;
    color: #ffffff;
}

.contexa-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.contexa-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.contexa-btn-secondary:hover {
    background: #cbd5e0;
}

.contexa-btn-text {
    background: transparent;
    color: #718096;
    padding: 8px 16px;
    font-size: 14px;
}

.contexa-btn-text:hover {
    color: #4a5568;
}

.contexa-btn-large {
    padding: 20px 48px;
    font-size: 18px;
}

.contexa-time-badge {
    font-size: 14px;
    opacity: 0.8;
}

/* Form elements */
.contexa-wizard-form {
    max-width: 400px;
    margin: 0 auto;
}

.contexa-form-group {
    margin-bottom: 24px;
}

.contexa-input-large {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.contexa-input-large:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Progress List */
.contexa-progress-list {
    max-width: 400px;
    margin: 40px auto;
    text-align: left;
}

.contexa-progress-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.contexa-progress-item.active {
    background: #edf2f7;
    font-weight: 600;
}

.contexa-progress-item.completed {
    background: #c6f6d5;
}

.contexa-progress-icon {
    font-size: 20px;
    margin-right: 16px;
    min-width: 24px;
}

.contexa-progress-text {
    font-size: 16px;
    color: #2d3748;
}

/* Progress Bar */
.contexa-progress-bar-container {
    margin-top: 40px;
}

.contexa-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.contexa-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.contexa-progress-percent {
    font-size: 14px;
    color: #718096;
    text-align: center;
    margin: 0;
}

/* Installation Options */
.contexa-install-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 40px 0;
}

.contexa-install-option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: left;
    position: relative;
    transition: all 0.2s ease;
}

.contexa-install-option:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contexa-option-recommended {
    border-color: #667eea;
    border-width: 3px;
}

.contexa-option-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: #667eea;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contexa-option-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.contexa-option-header p {
    font-size: 14px;
    color: #718096;
    margin: 0 0 20px 0;
}

.contexa-option-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.contexa-option-features li {
    font-size: 14px;
    color: #4a5568;
    padding: 8px 0;
}

.contexa-shortcode-box {
    background: #2d3748;
    color: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    font-size: 16px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contexa-copy-btn {
    background: #4a5568;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contexa-copy-btn:hover {
    background: #718096;
}

.contexa-option-note {
    font-size: 13px;
    color: #718096;
    margin: 16px 0;
}

/* Success Features */
.contexa-success-features {
    max-width: 300px;
    margin: 40px auto;
    text-align: left;
}

.contexa-success-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    color: #2d3748;
}

.contexa-success-icon {
    font-size: 24px;
    color: #48bb78;
    margin-right: 16px;
}

/* Messages */
.contexa-error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
    font-size: 14px;
}

.contexa-success-message {
    background: #c6f6d5;
    color: #2f855a;
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .contexa-wizard-content {
        padding: 40px 32px;
    }

    .contexa-wizard-content h1 {
        font-size: 28px;
    }

    .contexa-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contexa-install-options {
        grid-template-columns: 1fr;
    }
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contexa-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}
