/* Mobile Tutorial System Styles */
/* Optimized for touch interfaces and smaller screens */

/* ============================================
   OVERLAY
   ============================================ */

.mobile-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-tutorial-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-tutorial-overlay.modal-mode {
    pointer-events: auto;
    clip-path: none !important;
}

.mobile-tutorial-overlay.spotlight-mode {
    /* Spotlight mode uses clip-path set by JS */
    pointer-events: auto;
}

.mobile-tutorial-overlay.passthrough-mode {
    /* Allow clicks through the overlay */
    pointer-events: none !important;
}

/* ============================================
   HIGHLIGHTED ELEMENT
   ============================================ */

.mobile-tutorial-highlighted {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.9), 
                0 0 30px rgba(0, 212, 255, 0.7),
                0 0 60px rgba(0, 212, 255, 0.4);
    border-radius: 12px;
    animation: mobileTutorialPulse 1.5s ease-in-out infinite;
}

@keyframes mobileTutorialPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.9), 
                    0 0 30px rgba(0, 212, 255, 0.7),
                    0 0 60px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 212, 255, 1), 
                    0 0 40px rgba(0, 212, 255, 0.9),
                    0 0 80px rgba(0, 212, 255, 0.6);
    }
}

/* ============================================
   COACH MARK CONTAINER
   ============================================ */

.mobile-tutorial-coach-mark {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-tutorial-coach-mark.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   FULL-SCREEN MODAL (for explanations)
   ============================================ */

.mobile-tutorial-coach-mark.full-modal-style {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-tutorial-full-modal {
    background: linear-gradient(145deg, #1a1f3a, #0d1220);
    border: 2px solid var(--primary-color, #00d4ff);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.4),
                0 20px 60px rgba(0, 0, 0, 0.6);
    animation: mobileModalAppear 0.4s ease-out;
}

@keyframes mobileModalAppear {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mobile-tutorial-full-modal h3 {
    color: var(--primary-color, #00d4ff);
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.mobile-tutorial-full-modal p {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    white-space: pre-line;
}

.mobile-tutorial-full-modal .ship-types {
    text-align: left;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0 20px 0;
}

.mobile-tutorial-full-modal .ship-types div {
    padding: 8px 0;
    color: #ccc;
    font-size: 0.95rem;
}

.mobile-tutorial-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

/* ============================================
   SPOTLIGHT TOOLTIP (for "tap here")
   ============================================ */

.mobile-tutorial-coach-mark.tooltip-style {
    /* Position set by JS based on target element */
    max-width: calc(100vw - 40px);
}

.mobile-tutorial-tooltip {
    background: linear-gradient(145deg, #1a1f3a, #0d1220);
    border: 2px solid var(--primary-color, #00d4ff);
    border-radius: 16px;
    padding: 20px;
    max-width: 320px;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5),
                0 10px 40px rgba(0, 0, 0, 0.5);
    animation: mobileTooltipAppear 0.3s ease-out;
}

@keyframes mobileTooltipAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-tutorial-tooltip h4 {
    color: var(--primary-color, #00d4ff);
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    margin: 0 0 10px 0;
}

.mobile-tutorial-tooltip p {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   TOOLTIP ARROWS
   ============================================ */

.mobile-tutorial-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

.mobile-tutorial-arrow.bottom {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--primary-color, #00d4ff);
}

.mobile-tutorial-arrow.top {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--primary-color, #00d4ff);
}

.mobile-tutorial-arrow.left {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 12px solid var(--primary-color, #00d4ff);
}

.mobile-tutorial-arrow.right {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid var(--primary-color, #00d4ff);
}

/* ============================================
   BUTTONS
   ============================================ */

.mobile-tutorial-btn {
    padding: 16px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-tutorial-btn-primary {
    background: linear-gradient(135deg, var(--primary-color, #00d4ff) 0%, #0099cc 100%);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.5);
}

.mobile-tutorial-btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.4);
}

.mobile-tutorial-btn-skip {
    background: transparent;
    color: #666;
    font-size: 0.9rem;
    padding: 12px 20px;
}

.mobile-tutorial-btn-skip:active {
    color: #999;
}

/* Small button variants for spotlight tooltips */
.mobile-tutorial-btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.mobile-tutorial-btn-primary-small {
    background: linear-gradient(135deg, var(--primary-color, #00d4ff) 0%, #0099cc 100%);
    color: #000;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-tutorial-btn-primary-small:active {
    transform: scale(0.96);
}

.mobile-tutorial-btn-skip-small {
    background: transparent;
    color: #666;
    font-size: 0.8rem;
    padding: 6px 12px;
    cursor: pointer;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-tutorial-btn-skip-small:active {
    color: #aaa;
}

/* ============================================
   TAP INDICATOR (finger icon animation)
   ============================================ */

.mobile-tutorial-tap-indicator {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
    z-index: 10001;
    animation: tapAnimation 1.5s ease-in-out infinite;
}

.mobile-tutorial-tap-indicator::before {
    content: '👆';
    font-size: 2rem;
}

@keyframes tapAnimation {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.7;
    }
}

/* ============================================
   SWIPE INDICATOR (for carousel)
   ============================================ */

.mobile-tutorial-swipe-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    color: var(--primary-color, #00d4ff);
    font-size: 0.9rem;
    animation: swipeHint 2s ease-in-out infinite;
}

.mobile-tutorial-swipe-indicator .swipe-arrow {
    font-size: 1.2rem;
}

@keyframes swipeHint {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.mobile-tutorial-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.mobile-tutorial-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.mobile-tutorial-progress-dot.active {
    background: var(--primary-color, #00d4ff);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.mobile-tutorial-progress-dot.completed {
    background: #00ff88;
}

/* ============================================
   DRAWER HIGHLIGHT (special case)
   ============================================ */

/* When drawer is open and we need to highlight a button inside */
.command-console-drawer.tutorial-active {
    z-index: 9999 !important;
}

.command-console-drawer .drawer-btn.mobile-tutorial-highlighted {
    animation: mobileTutorialPulse 1.5s ease-in-out infinite;
}

/* ============================================
   COACH MARK MODE — centered instruction card
   ============================================ */

/* Slightly more compact card styling for coach marks */
.mobile-tutorial-full-modal.coach-mark-card {
    max-width: 360px;
    padding: 24px 20px;
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3),
                0 15px 40px rgba(0, 0, 0, 0.5);
}

.mobile-tutorial-full-modal.coach-mark-card h3 {
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.mobile-tutorial-full-modal.coach-mark-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ---- Hint pulse indicators ---- */
/* Positioned absolutely within the coach-mark container */
.coach-hint-pulse {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.15);
    border: 2px solid rgba(0, 212, 255, 0.5);
    animation: coachHintPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 10002;
    display: none; /* Hidden — confusing since the pulsing circle isn't clickable */
}

@keyframes coachHintPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* Quadrant positions */
.coach-hint-pulse.coach-hint-top-center {
    top: 12%;
    left: 50%;
    margin-left: -30px;
}

.coach-hint-pulse.coach-hint-bottom-center {
    bottom: 12%;
    left: 50%;
    margin-left: -30px;
    top: auto;
}

.coach-hint-pulse.coach-hint-bottom-left {
    bottom: 12%;
    left: 15%;
    top: auto;
}

.coach-hint-pulse.coach-hint-bottom-right {
    bottom: 12%;
    right: 15%;
    left: auto;
    top: auto;
}

.coach-hint-pulse.coach-hint-top-left {
    top: 12%;
    left: 15%;
}

.coach-hint-pulse.coach-hint-top-right {
    top: 12%;
    right: 15%;
    left: auto;
}
