/* ==========================================
   ONBOARDING STYLES
   Welcome modal, product tour, and checklist
   ========================================== */

/* Welcome Modal */
.onboarding-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.onboarding-modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 520px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 100px rgba(99, 102, 241, 0.15);
    animation: slideUp 0.4s ease;
}

.onboarding-modal h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.onboarding-modal .subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.onboarding-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.onboarding-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.onboarding-feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.onboarding-feature h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-main);
}

.onboarding-feature p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.onboarding-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.onboarding-modal-actions .btn {
    min-width: 140px;
}

/* Tour Tooltip */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    pointer-events: none;
}

.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.6), 0 0 30px rgba(99, 102, 241, 0.4);
    border-radius: 0.5rem;
    animation: pulse-highlight 2s infinite;
}

.tour-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    max-width: 320px;
    z-index: 10001;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.5);
    transform: rotate(45deg);
}

.tour-tooltip.position-bottom::before {
    top: -7px;
    left: 50%;
    margin-left: -6px;
    border-right: none;
    border-bottom: none;
}

.tour-tooltip.position-top::before {
    bottom: -7px;
    left: 50%;
    margin-left: -6px;
    border-left: none;
    border-top: none;
}

.tour-tooltip.position-left::before {
    right: -7px;
    top: 50%;
    margin-top: -6px;
    border-left: none;
    border-bottom: none;
}

.tour-tooltip.position-right::before {
    left: -7px;
    top: 50%;
    margin-top: -6px;
    border-right: none;
    border-top: none;
}

.tour-tooltip h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--primary);
}

.tour-tooltip p {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tour-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-dots {
    display: flex;
    gap: 0.375rem;
}

.tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.tour-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.tour-dot.completed {
    background: var(--success);
}

.tour-actions {
    display: flex;
    gap: 0.5rem;
}

.tour-actions .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* Quick Start Checklist */
.quickstart-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: slideDown 0.4s ease;
}

.quickstart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.quickstart-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quickstart-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.quickstart-dismiss:hover {
    opacity: 1;
}

.quickstart-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.quickstart-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.quickstart-tasks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.quickstart-task {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-main);
}

.quickstart-task:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}

.quickstart-task.completed {
    opacity: 0.6;
}

.quickstart-task.completed .task-check {
    background: var(--success);
    border-color: var(--success);
}

.quickstart-task.completed .task-check::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
}

.task-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-label {
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-highlight {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.6), 0 0 30px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.4), 0 0 50px rgba(99, 102, 241, 0.3);
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .onboarding-modal {
        padding: 1.5rem;
        margin: 1rem;
    }

    .onboarding-features {
        grid-template-columns: 1fr;
    }

    .onboarding-modal-actions {
        flex-direction: column;
    }

    .quickstart-tasks {
        grid-template-columns: 1fr;
    }

    .tour-tooltip {
        max-width: 280px;
        margin: 0 1rem;
    }
}