/* ThinkForge Parent Onboarding Tour Styles */

/* Overlay */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tour-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Spotlight cutout effect */
.tour-spotlight {
    position: absolute;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.3),
        0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
    transition: all 0.3s ease;
}

.tour-spotlight.pulse {
    animation: spotlight-pulse 2s infinite;
}

@keyframes spotlight-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(102, 126, 234, 0.3),
            0 0 0 9999px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(102, 126, 234, 0.5),
            0 0 0 9999px rgba(0, 0, 0, 0.5);
    }
}

/* Tooltip/Popover */
.tour-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 400px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.tour-tooltip.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.tour-tooltip-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.tour-tooltip-content {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Progress indicator */
.tour-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: #64748b;
}

.tour-progress-bar {
    display: flex;
    gap: 4px;
}

.tour-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.tour-progress-dot.active {
    background: #667eea;
    transform: scale(1.2);
}

.tour-progress-dot.completed {
    background: #10b981;
}

/* Buttons */
.tour-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.tour-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tour-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tour-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tour-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

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

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

/* Welcome Modal */
.tour-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    z-index: 10001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: all 0.3s ease;
}

.tour-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.tour-modal-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
}

.tour-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tour-modal-content {
    font-size: 1.1rem;
    color: #475569;
    text-align: center;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.tour-skip-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #64748b;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.tour-skip-link:hover {
    color: #475569;
    text-decoration: underline;
}

/* Arrow indicators */
.tour-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tour-arrow-top {
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
}

.tour-arrow-bottom {
    top: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent white transparent;
}

.tour-arrow-left {
    right: -10px;
    top: 50%;
    margin-top: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.tour-arrow-right {
    left: -10px;
    top: 50%;
    margin-top: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* Confetti effect (simple CSS) */
.tour-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #667eea;
    position: absolute;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .tour-tooltip {
        max-width: calc(100vw - 40px);
        padding: 20px;
        border-radius: 12px;
    }

    .tour-tooltip-title {
        font-size: 1.1rem;
    }

    .tour-tooltip-content {
        font-size: 0.95rem;
    }

    .tour-modal {
        padding: 32px 24px;
        max-width: calc(100vw - 40px);
    }

    .tour-modal-title {
        font-size: 1.5rem;
    }

    .tour-modal-content {
        font-size: 1rem;
    }

    .tour-buttons {
        flex-direction: column;
    }

    .tour-btn {
        width: 100%;
    }

    /* Ensure tooltips are always at bottom on mobile */
    .tour-tooltip {
        bottom: 20px !important;
        left: 20px !important;
        right: 20px !important;
        top: auto !important;
        transform: none !important;
    }
}

/* Prevent body scroll during tour */
body.tour-active {
    overflow: hidden;
}

/* Smooth scroll behavior */
html.tour-scrolling {
    scroll-behavior: smooth;
}

/* Accessibility */
.tour-tooltip:focus,
.tour-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state */
.tour-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: tour-spin 0.6s linear infinite;
}

@keyframes tour-spin {
    to { transform: rotate(360deg); }
}
