/* =============================================
   SheetLink Forms — Setup Wizard styles
   Uses design tokens from admin-ui.css
   ============================================= */

#wpcontent {
    padding-left: 0;
}

.sl-wizard-wrap {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 24px 60px;
    color: var(--sl-text);
}

.sl-wizard-header {
    text-align: center;
    margin-bottom: 28px;
}

.sl-wizard-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--sl-text);
}

.sl-wizard-subtitle {
    margin: 0;
    color: var(--sl-text-muted);
    font-size: 14px;
}

/* ---------- Step indicator ---------- */
.sl-wizard-steps {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: flex;
    justify-content: space-between;
    counter-reset: none;
    position: relative;
}

.sl-wizard-steps::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 16px;
    height: 2px;
    background: var(--sl-border-light);
    z-index: 0;
}

.sl-wizard-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.sl-wizard-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--sl-border-light);
    color: var(--sl-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.sl-wizard-step-label {
    font-size: 12px;
    color: var(--sl-text-muted);
    text-align: center;
    line-height: 1.3;
}

.sl-wizard-step.is-complete .sl-wizard-step-num {
    background: var(--sl-success);
    border-color: var(--sl-success);
    color: #fff;
}

.sl-wizard-step.is-current .sl-wizard-step-num {
    background: var(--sl-primary);
    border-color: var(--sl-primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--sl-primary-light);
}

.sl-wizard-step.is-current .sl-wizard-step-label {
    color: var(--sl-primary);
    font-weight: 600;
}

/* ---------- Panels ---------- */
.sl-wizard-body {
    background: #fff;
    border: 1px solid var(--sl-border-light);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sl-wizard-panel h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--sl-text);
}

.sl-wizard-panel h3 {
    margin: 20px 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sl-text);
}

.sl-wizard-panel p {
    color: var(--sl-text-muted);
    line-height: 1.6;
    margin: 0 0 14px;
}

.sl-wizard-panel p.description {
    font-style: normal;
    color: var(--sl-text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.sl-wizard-checklist,
.sl-wizard-numbered {
    margin: 0 0 16px 20px;
    color: var(--sl-text);
    line-height: 1.8;
}

.sl-wizard-checklist li,
.sl-wizard-numbered li {
    margin-bottom: 4px;
}

/* ---------- Plugin picker ---------- */
.sl-wizard-plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.sl-wizard-plugin-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--sl-border-light);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s ease;
    position: relative;
}

.sl-wizard-plugin-card:hover {
    border-color: var(--sl-primary);
    background: var(--sl-primary-light);
}

.sl-wizard-plugin-card input[type="radio"] {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
}

.sl-wizard-plugin-card.is-active {
    border-color: var(--sl-success);
    background: var(--sl-success-light);
}

.sl-wizard-plugin-card:has(input[type="radio"]:checked) {
    border-color: var(--sl-primary);
    background: var(--sl-primary-light);
    box-shadow: 0 0 0 2px var(--sl-primary-light);
}

.sl-wizard-plugin-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--sl-text);
    padding-right: 30px;
}

.sl-wizard-plugin-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 10px;
}

.sl-wizard-plugin-badge--active {
    background: var(--sl-success);
    color: #fff;
}

.sl-wizard-plugin-badge--inactive {
    background: var(--sl-border-light);
    color: var(--sl-text-muted);
}

/* ---------- Script box ---------- */
.sl-wizard-deploy-steps {
    margin: 0 0 20px 20px;
    line-height: 1.8;
    color: var(--sl-text);
}

.sl-wizard-deploy-steps a {
    color: var(--sl-primary);
    text-decoration: underline;
}

.sl-wizard-script-box {
    border: 1px solid var(--sl-border-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.sl-wizard-script-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--sl-bg);
    border-bottom: 1px solid var(--sl-border-light);
}

.sl-wizard-script-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#sl-wizard-script {
    width: 100%;
    border: 0;
    border-radius: 0;
    font-family: Menlo, Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px;
    background: #fbfbfb;
    resize: vertical;
    box-shadow: none;
}

#sl-wizard-script:focus {
    outline: 2px solid var(--sl-primary);
    outline-offset: -2px;
    box-shadow: none;
}

/* ---------- Test row ---------- */
.sl-wizard-test-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 24px;
}

.sl-wizard-test-status {
    font-size: 13px;
    color: var(--sl-text-muted);
}

.sl-wizard-test-status.is-success {
    color: var(--sl-success-text);
    font-weight: 600;
}

.sl-wizard-test-status.is-error {
    color: var(--sl-danger-text);
    font-weight: 600;
}

.sl-wizard-test-status.is-pending {
    color: var(--sl-text-muted);
}

/* License step status */
.sl-wizard-license-status {
    font-size: 13px;
    line-height: 1.5;
}
.sl-wizard-license-status.sl-success { color: var(--sl-success-text); font-weight: 600; }
.sl-wizard-license-status.sl-error   { color: var(--sl-danger-text); }
.sl-wizard-license-status.sl-pending { color: var(--sl-text-muted); }

/* ---------- Actions ---------- */
.sl-wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--sl-border-light);
}

.sl-wizard-actions .button-primary:only-child,
.sl-wizard-actions .button-primary:last-child {
    margin-left: auto;
}

.sl-wizard-skip {
    color: var(--sl-text-muted);
    text-decoration: none;
}

.sl-wizard-skip:hover {
    color: var(--sl-danger);
}

/* ---------- Done step ---------- */
.sl-wizard-done-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 20px 0 8px;
}

.sl-wizard-done-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--sl-border-light);
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    color: var(--sl-text);
    transition: all 0.15s ease;
}

.sl-wizard-done-card:hover {
    border-color: var(--sl-primary);
    background: var(--sl-primary-light);
    transform: translateX(2px);
}

.sl-wizard-done-card strong {
    font-size: 14px;
    color: var(--sl-primary);
    font-weight: 600;
}

.sl-wizard-done-card span {
    font-size: 13px;
    color: var(--sl-text-muted);
    line-height: 1.5;
}

/* ---------- Narrow viewport ---------- */
@media (max-width: 720px) {
    .sl-wizard-wrap {
        margin: 20px auto;
        padding: 0 12px 40px;
    }
    .sl-wizard-body {
        padding: 20px;
    }
    .sl-wizard-step-label {
        display: none;
    }
}
