/* ========================================
   Onboarding Sidebar Styles
   ======================================== */

.onboarding-sidebar {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 1050;
    font-family: inherit;
}

/* Floating Action Button (Minimized State) */
.onboarding-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: all 0.3s ease;
    position: relative;
}

.onboarding-fab:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.onboarding-fab.hidden {
    display: none;
}

.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background-color: var(--warning);
    color: var(--text-inverse);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* Expanded Panel */
.onboarding-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 340px;
    max-height: 480px;
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.onboarding-panel.visible {
    display: flex;
}

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

/* Panel Header */
.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--gradient-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.onboarding-progress {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-bar-mini {
    width: 120px;
    height: 4px;
    background-color: var(--border-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.onboarding-minimize {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: none;
    background-color: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.onboarding-minimize:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

/* Panel Content */
.onboarding-content {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
}

.step-content {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
    font-size: 1.75rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.step-action {
    margin-top: var(--space-md);
}

.step-action .btn {
    width: 100%;
}

.step-hint {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background-color: var(--surface-secondary);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: center;
}

.step-hint i {
    color: var(--info);
}

/* Pre-filled form in step 1 */
.onboarding-form {
    text-align: left;
}

.onboarding-form .form-label {
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
}

.onboarding-form .form-control {
    font-size: 0.9rem;
    padding: var(--space-sm);
}

.onboarding-form .btn {
    margin-top: var(--space-md);
}

/* Trial badge in step 4 */
.trial-notice {
    background: var(--warning-bg);
    border: 1px solid rgba(240, 180, 41, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.trial-notice-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.trial-notice-text strong {
    color: var(--warning);
}

/* Panel Footer */
.onboarding-footer {
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--surface-secondary);
    border-top: 1px solid var(--border-primary);
    text-align: center;
}

.onboarding-footer .btn-ghost {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.onboarding-footer .btn-ghost:hover {
    color: var(--text-secondary);
}

/* Completion state */
.step-complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-bg);
    border-radius: 50%;
    color: var(--success);
    font-size: 2.5rem;
}

/* Responsive */
@media (max-width: 576px) {
    .onboarding-sidebar {
        bottom: var(--space-md);
        right: var(--space-md);
    }

    .onboarding-panel {
        width: calc(100vw - var(--space-xl));
        max-width: 340px;
    }
}

/* Highlight effect for elements during onboarding */
.onboarding-highlight {
    position: relative;
    z-index: 100;
    box-shadow: 0 0 0 4px var(--accent-primary), var(--shadow-glow) !important;
    animation: pulseHighlight 2s infinite;
}

@keyframes pulseHighlight {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--accent-primary), var(--shadow-glow);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(198, 120, 221, 0.3), var(--shadow-glow);
    }
}
