/* ========================================
   COMBAT TUTORIAL STYLES
   ======================================== */

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998; /* Very high - above MudBlazor dialogs */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-overlay.active {
    opacity: 1;
}

/* Full Backdrop - visual blur only, does not block clicks */
.tutorial-backdrop-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
    z-index: 99998;
    pointer-events: none;
}

/* Old backdrop kept for compatibility but not used */
.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
    z-index: 1;
    pointer-events: none;
}

/* Spotlight Effect (highlight target element) */
/* The large box-shadow creates the full-screen dark overlay outside the spotlight.
   pointer-events: none ensures clicks pass through to the highlighted element. */
.tutorial-spotlight {
    position: fixed;
    z-index: 100001;
    pointer-events: none;
    border: 3px solid #ffd700;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65),
                0 0 30px rgba(255, 215, 0, 0.8),
                0 0 50px rgba(255, 215, 0, 0.4);
    animation: pulse-spotlight 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

@keyframes pulse-spotlight {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65),
                    0 0 30px rgba(255, 215, 0, 0.8),
                    0 0 50px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65),
                    0 0 50px rgba(255, 215, 0, 1),
                    0 0 70px rgba(255, 215, 0, 0.6);
    }
}

/* Tutorial Tooltip */
.tutorial-tooltip {
    position: fixed;
    z-index: 100002; /* High - above all modals but below skip dialog */
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 0;
    max-width: 400px; /* Reduced by 1/3 from 600px */
    min-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.3);
    animation: tooltip-fade-in 0.4s ease;
    pointer-events: all;
}

/* Ensure MudBlazor dialogs (like Skip Tutorial) appear above everything */
.mud-dialog-container {
    z-index: 100003 !important; /* Highest - above tutorial tooltip */
    pointer-events: all !important; /* Ensure clickable */
}

.mud-overlay {
    z-index: 100003 !important; /* Same level as dialog container */
    pointer-events: all !important; /* Ensure clickable */
}

.mud-dialog {
    z-index: 100003 !important; /* Ensure dialog itself is on top */
    pointer-events: all !important; /* Ensure clickable */
}

.mud-button {
    pointer-events: all !important; /* Ensure buttons are clickable */
}

.mud-dialog .mud-button {
    z-index: 100004 !important; /* Buttons above everything else */
}

@keyframes tooltip-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Tooltip Header */
.tutorial-tooltip-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 10px 10px 0 0;
}

.tutorial-tooltip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.tutorial-tooltip-title {
    flex: 1;
}

.tutorial-tooltip-title h6 {
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    margin: 0;
}

/* Tooltip Body */
.tutorial-tooltip-body {
    padding: 1.5rem;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Tooltip Footer */
.tutorial-tooltip-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tutorial-tooltip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Progress Dots */
.tutorial-progress-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tutorial-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tutorial-progress-dot.active {
    width: 12px;
    height: 12px;
    background: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.tutorial-progress-dot.completed {
    background: rgba(76, 175, 80, 0.6);
}

/* Tooltip Positioning Classes */
.tutorial-tooltip.position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tutorial-tooltip.position-top {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.tutorial-tooltip.position-bottom {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.tutorial-tooltip.position-left {
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

.tutorial-tooltip.position-right {
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tutorial-tooltip {
        max-width: 90vw;
        min-width: 280px;
    }

    /* On mobile, force everything to center for better readability */
    .tutorial-tooltip.position-left,
    .tutorial-tooltip.position-right,
    .tutorial-tooltip.position-top,
    .tutorial-tooltip.position-bottom {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
    }

    .tutorial-tooltip-header {
        padding: 1rem;
    }

    .tutorial-tooltip-body {
        padding: 1rem;
    }

    .tutorial-tooltip-footer {
        padding: 0.75rem 1rem;
    }

    .tutorial-tooltip-icon {
        width: 40px;
        height: 40px;
    }
}

/* Pulsing Animation for Action Steps */
.tutorial-tooltip.action-required {
    animation: pulse-action 1.5s ease-in-out infinite;
}

@keyframes pulse-action {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
    }
}
