/* =============================================================
   DataStackLogic Schema Manager — Onboarding Wizard
   ============================================================= */

/* ── Full-page layout ────────────────────────────────────────── */
.datascma-ob-body {
    background: #040811;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e2e8f0;
    margin: 0;
    padding: 0;
}

/* Hide WP admin bar on wizard */
.datascma-ob-body #wpadminbar { display: none !important; }
.datascma-ob-body html { margin-top: 0 !important; }

.datascma-ob-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ── Header ──────────────────────────────────────────────────── */
.datascma-ob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.datascma-ob-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.datascma-ob-logo-icon {
    font-size: 28px;
    line-height: 1;
}

.datascma-ob-logo-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.datascma-ob-logo-sub {
    display: block;
    font-size: 12px;
    color: #00D4FF;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.datascma-ob-skip-form {
    margin: 0;
}

.datascma-ob-skip {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
    padding: 6px 0;
    transition: color 0.15s;
}

.datascma-ob-skip:hover { color: #94a3b8; }

/* ── Progress bar ────────────────────────────────────────────── */
.datascma-ob-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    gap: 0;
}

.datascma-ob-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.datascma-ob-progress-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: #0a1628;
    border: 2px solid #1a2640;
    color: #64748b;
    transition: all 0.25s;
}

.datascma-ob-progress-step.active .datascma-ob-progress-circle {
    background: #00D4FF;
    border-color: #00D4FF;
    color: #040811;
}

.datascma-ob-progress-step.done .datascma-ob-progress-circle {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00D4FF;
    color: #00D4FF;
}

.datascma-ob-check { font-size: 16px; }

.datascma-ob-progress-label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

.datascma-ob-progress-step.active .datascma-ob-progress-label { color: #00D4FF; }
.datascma-ob-progress-step.done  .datascma-ob-progress-label  { color: #00D4FF; }

.datascma-ob-progress-line {
    flex: 1;
    height: 2px;
    background: #1a2640;
    margin: 0 8px;
    margin-bottom: 24px;
    min-width: 40px;
    max-width: 80px;
    transition: background 0.25s;
}

.datascma-ob-progress-line.done { background: #00D4FF; }

/* ── Card ────────────────────────────────────────────────────── */
.datascma-ob-card {
    background: #0a1628;
    border: 1px solid #1a2640;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
    .datascma-ob-card { padding: 24px 20px; }
}

/* ── Step content ────────────────────────────────────────────── */
.datascma-ob-step-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 16px;
}

.datascma-ob-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin: 0 0 12px;
}

.datascma-ob-desc {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    margin: 0 0 32px;
    line-height: 1.6;
}

.datascma-ob-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #00D4FF;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 20px 0 10px;
}

/* ── Form fields ─────────────────────────────────────────────── */
.datascma-ob-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.datascma-ob-row {
    display: flex;
    gap: 14px;
}

@media (max-width: 520px) {
    .datascma-ob-row { flex-direction: column; }
}

.datascma-ob-field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.datascma-ob-field-2 { flex: 1; }
.datascma-ob-field-3 { flex: 1; }

.datascma-ob-field label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.datascma-ob-req { color: #ef4444; }

.datascma-ob-field input[type="text"],
.datascma-ob-field input[type="email"],
.datascma-ob-field input[type="tel"],
.datascma-ob-field select {
    background: #040811;
    border: 1px solid #1a2640;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.datascma-ob-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.datascma-ob-field input:focus,
.datascma-ob-field select:focus {
    outline: none;
    border-color: #00D4FF;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.datascma-ob-field input::placeholder { color: #334155; }

.datascma-ob-hint {
    font-size: 12px;
    color: #64748b;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
}

/* ── Actions ─────────────────────────────────────────────────── */
.datascma-ob-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.datascma-ob-btn-primary {
    background: #00D4FF;
    color: #040811;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.datascma-ob-btn-primary:hover {
    background: #00b8e0;
    transform: translateY(-1px);
}

.datascma-ob-btn-primary:active { transform: translateY(0); }

.datascma-ob-btn-skip {
    background: none;
    border: 1px solid #1a2640;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.datascma-ob-btn-skip:hover {
    border-color: #334155;
    color: #94a3b8;
}

.datascma-ob-btn-text {
    background: none;
    border: none;
    font-size: 12px;
    color: #00D4FF;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.datascma-ob-step-count {
    font-size: 12px;
    color: #334155;
    margin-left: auto;
}

/* ── Bot grid (step 3) ───────────────────────────────────────── */
.datascma-ob-bots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.datascma-ob-bots-count { font-size: 13px; color: #64748b; }
.datascma-ob-bots-count strong { color: #00D4FF; }

.datascma-ob-bots-actions {
    display: flex;
    gap: 14px;
}

.datascma-ob-bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 28px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.datascma-ob-bots-grid::-webkit-scrollbar { width: 4px; }
.datascma-ob-bots-grid::-webkit-scrollbar-track { background: transparent; }
.datascma-ob-bots-grid::-webkit-scrollbar-thumb { background: #1a2640; border-radius: 2px; }

.datascma-ob-bot-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #040811;
    border: 1px solid #1a2640;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.datascma-ob-bot-card:hover { border-color: #334155; }

.datascma-ob-bot-card.checked {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.04);
}

.datascma-ob-bot-card input[type="checkbox"] {
    display: none;
}

.datascma-ob-bot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.datascma-ob-bot-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.datascma-ob-bot-ai {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.datascma-ob-bot-status {
    font-size: 14px;
    color: #00D4FF;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Score ring (step 4) ─────────────────────────────────────── */
.datascma-ob-score-wrap {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.datascma-ob-score-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

.datascma-ob-score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.datascma-ob-score-track {
    fill: none;
    stroke: #1a2640;
    stroke-width: 8;
}

.datascma-ob-score-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.datascma-ob-score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.datascma-ob-score-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.datascma-ob-score-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.datascma-ob-score-grade {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

/* ── Breakdown bars ──────────────────────────────────────────── */
.datascma-ob-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.datascma-ob-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.datascma-ob-bar-label {
    font-size: 12px;
    color: #94a3b8;
    width: 100px;
    flex-shrink: 0;
}

.datascma-ob-bar-track {
    flex: 1;
    height: 6px;
    background: #1a2640;
    border-radius: 3px;
    overflow: hidden;
}

.datascma-ob-bar-fill {
    height: 100%;
    background: #00D4FF;
    border-radius: 3px;
    transition: width 1s ease;
}

.datascma-ob-bar-score {
    font-size: 12px;
    color: #64748b;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Next steps ──────────────────────────────────────────────── */
.datascma-ob-next-steps {
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 28px;
}

.datascma-ob-next-steps h3 {
    font-size: 13px;
    font-weight: 700;
    color: #00D4FF;
    margin: 0 0 12px;
}

.datascma-ob-next-steps ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.datascma-ob-next-steps li {
    font-size: 13px;
    margin-bottom: 8px;
}

.datascma-ob-next-steps li:last-child { margin-bottom: 0; }

.datascma-ob-next-steps a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.15s;
}

.datascma-ob-next-steps a:hover { color: #00D4FF; }

/* ── Done actions ────────────────────────────────────────────── */
.datascma-ob-done-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.datascma-ob-done-actions form { margin: 0; }

.datascma-ob-btn-outline {
    display: inline-block;
    border: 1px solid #1a2640;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 14px;
    color: #94a3b8;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.datascma-ob-btn-outline:hover {
    border-color: #00D4FF;
    color: #00D4FF;
}

.datascma-ob-pro-note {
    font-size: 12px;
    color: #334155;
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

/* ── Field validation error state ───────────────────────────── */
.datascma-ob-field .datascma-ob-field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
