/* search/css/search-tutorial.css */

/* --- OVERLAY & SPOTLIGHT --- */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse var(--spot-w, 100px) var(--spot-h, 100px) at var(--spot-x, 50%) var(--spot-y, 50%), transparent calc(100% - 2px), rgba(0, 0, 0, 0.85) 100%);
    z-index: 10000;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
    /* Helps with spotlight effect */
}

.tutorial-overlay.active {
    display: block;
    opacity: 1;
}

/* --- MASCOT CONTAINER --- */
.mascot-container {
    position: fixed;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy transition */
    pointer-events: none;
    /* Let clicks pass through to potential buttons if needed, but bubble has pointer-events: auto */
    width: 300px;
}

/* Default position (Top Right for Welcome) */
.mascot-container.welcome-pos {
    top: 20px;
    right: 20px;
}

/* Mascot Image */
.mascot-image {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.mascot-image.talking {
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-5px);
    }
}

/* Speech Bubble */
.speech-bubble {
    background: var(--bg-card);
    color: var(--text);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    margin-top: 10px;
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
    max-width: 280px;
    text-align: center;
    backdrop-filter: blur(20px);
}

.speech-bubble.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Arrow for Bubble */
.speech-bubble::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--bg-card) transparent;
}

/* Text Content */
.bubble-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: var(--primary);
}

.bubble-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Buttons */
.bubble-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.tutorial-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tutorial-btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .mascot-container {
        width: 90%;
        max-width: 320px;
    }

    .mascot-container.welcome-pos {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
    }

    .mascot-image {
        width: 100px;
    }
}