/* ========================================
   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(--accent-primary);
    border: none;
    color: var(--accent-contrast);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: background-color 0.15s ease;
    position: relative;
}

.onboarding-fab:hover,
.onboarding-fab:focus-visible {
    background: var(--accent-hover);
}

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

.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background-color: var(--text-primary);
    color: var(--bg-secondary);
    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.2s 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(--surface-primary);
    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(--surface-active);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-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; }
}

/* The step's own icon is decorative; the title carries the meaning. */
.step-icon {
    display: none;
}

.step-title {
    font-size: 1.07rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.step-description {
    font-size: 0.93rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    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.86rem;
    color: var(--text-secondary);
}

/* 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 color-mix(in srgb, var(--warning) 30%, var(--border-primary));
    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(--text-primary);
}

/* 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 {
    margin: 0 auto var(--space-sm);
    color: var(--success);
    font-size: 2rem;
    line-height: 1;
}

/* 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;
    outline: 2px solid var(--accent-primary) !important;
    outline-offset: 3px;
}
