/* inqiro Onboarding Wizard */

/* Base */
.iq-setup-body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f0ff 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.iq-setup-body #wpadminbar { display: none; }
.iq-setup-body html { margin-top: 0 !important; }

.iq-setup-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header */
.iq-setup-header {
    text-align: center;
    margin-bottom: 40px;
}

.iq-setup-logo {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
}

.iq-setup-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.iq-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 100px;
}

.iq-step-indicator span {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    transition: color 0.3s;
}

.iq-step-indicator.active span { color: #3b82f6; }
.iq-step-indicator.done span { color: #22c55e; }

.iq-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.iq-step-dot.active {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.iq-step-dot.done {
    background: #22c55e;
    color: #fff;
}

.iq-step-line {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 4px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.iq-step-line.done { background: #22c55e; }

/* Steps */
.iq-setup-step {
    display: none;
    animation: iq-fade-in 0.35s ease;
}

.iq-setup-step.active { display: block; }

@keyframes iq-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card */
.iq-setup-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.iq-setup-card.wide { max-width: 900px; margin: 0 auto; }

.iq-setup-icon { font-size: 48px; margin-bottom: 16px; }
.iq-setup-icon.big { font-size: 72px; }

.iq-setup-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.iq-setup-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 8px 0;
}

.iq-setup-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Forms */
.iq-setup-form { text-align: left; max-width: 480px; margin: 0 auto; }

.iq-form-section { margin-bottom: 20px; }
.iq-form-section h3 { font-size: 15px; font-weight: 600; color: #334155; margin: 0 0 4px; }
.iq-form-hint { font-size: 13px; color: #94a3b8; margin: 0 0 10px; }

.iq-input-group { display: flex; gap: 8px; }

.iq-setup-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.iq-setup-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

textarea.iq-setup-input { resize: vertical; }

.iq-color-input {
    width: 50px;
    height: 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 2px;
    cursor: pointer;
}

.iq-form-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.iq-form-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: #e2e8f0;
}

.iq-form-divider span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    color: #94a3b8;
    font-size: 13px;
}

.iq-field { margin-bottom: 16px; }
.iq-field label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 5px; }
.iq-optional { font-weight: 400; color: #94a3b8; }
.iq-field-row { display: flex; gap: 12px; }
.iq-field-row .iq-field { flex: 1; }

/* Buttons */
.iq-setup-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.iq-setup-btn.primary {
    background: #3b82f6;
    color: #fff;
}

.iq-setup-btn.primary:hover {
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.iq-setup-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.iq-setup-btn.secondary:hover { background: #e2e8f0; }

.iq-setup-btn.large {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 12px;
}

.iq-setup-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.iq-setup-link {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}

.iq-setup-link:hover { color: #3b82f6; }

.iq-setup-actions { margin-top: 28px; }

/* Error */
.iq-setup-error {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
}

/* Success */
.iq-success-icon { font-size: 56px; margin-bottom: 8px; }

.iq-license-success { padding: 20px 0; }

/* Scan info */
.iq-scan-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: left;
}

.iq-info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    color: #475569;
}

/* Progress */
.iq-progress-container { margin: 24px 0; }

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

.iq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.iq-progress-text {
    font-size: 13px;
    color: #64748b;
}

.iq-progress-steps { margin-top: 20px; text-align: left; }

.iq-progress-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.iq-progress-step:last-child { border-bottom: none; }

.iq-ps-icon { font-size: 18px; min-width: 24px; text-align: center; }

.iq-progress-step strong { display: block; font-size: 14px; color: #1e293b; }
.iq-progress-step span { font-size: 12px; color: #94a3b8; }

/* Scan results */
.iq-scan-results {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 20px 0;
}

.iq-result-item { text-align: center; }

.iq-result-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
}

.iq-result-item span:last-child {
    font-size: 12px;
    color: #64748b;
}

/* Customize grid */
.iq-customize-grid {
    display: flex;
    gap: 32px;
    text-align: left;
    margin-top: 20px;
}

.iq-customize-form { flex: 1; min-width: 0; }
.iq-preview-container { flex: 0 0 240px; }

/* Preview */
.iq-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
}

.iq-preview-widget {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-size: 12px;
}

.iq-preview-header {
    padding: 10px 12px;
    background: #3b82f6;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iq-preview-avatar { font-size: 16px; }
.iq-preview-name { font-weight: 600; font-size: 13px; }

.iq-preview-messages { padding: 10px; background: #fff; min-height: 120px; }

.iq-preview-msg {
    padding: 6px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 11px;
}

.iq-preview-msg.bot {
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 3px;
}

.iq-preview-msg.user {
    background: #3b82f6;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.iq-preview-input {
    padding: 8px 12px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
    color: #94a3b8;
    font-size: 11px;
}

/* Done screen */
.iq-done-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}

.iq-done-tips {
    text-align: left;
    max-width: 400px;
    margin: 24px auto 0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px 20px;
}

.iq-done-tips h3 {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 10px;
}

.iq-tip {
    padding: 5px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

/* Legal hint */
.iq-setup-legal {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 16px;
    text-align: center;
    line-height: 1.5;
}

.iq-setup-legal a {
    color: #3b82f6;
    text-decoration: underline;
}

.iq-setup-legal a:hover {
    color: #2563eb;
}

/* Help tooltips */
.iq-help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-size: 11px; font-weight: 700; cursor: help; margin-left: 4px; position: relative; vertical-align: middle; line-height: 1; font-style: normal; }
.iq-help:hover { background: #3b82f6; color: #fff; }
.iq-help::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 8px 12px; background: #1f2937; color: #fff; font-size: 12px; font-weight: 400; border-radius: 6px; white-space: normal; width: max-content; max-width: 260px; z-index: 100000; line-height: 1.4; text-align: left; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.iq-help::before { content: ''; position: absolute; left: 50%; bottom: calc(100% + 1px); transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2937; z-index: 100000; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.iq-help:hover::after, .iq-help:hover::before { opacity: 1; }

/* Responsive */
@media (max-width: 600px) {
    .iq-setup-card { padding: 24px 20px; }
    .iq-input-group { flex-direction: column; }
    .iq-field-row { flex-direction: column; }
    .iq-customize-grid { flex-direction: column; }
    .iq-preview-container { flex: none; }
    .iq-scan-results { flex-direction: column; gap: 12px; }
    .iq-setup-steps { gap: 0; }
    .iq-step-line { width: 30px; }
    .iq-step-indicator { min-width: 70px; }
    .iq-step-indicator span { font-size: 10px; }
}
