/* ============================================
   NEPP Tutorial System Styles
   Professional Onboarding Experience
   ============================================ */

/* Tutorial Overlay - dims the page */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tutorial-overlay.active {
    pointer-events: auto;
}

/* Spotlight mask - SVG-based for smooth cutout */
.tutorial-spotlight-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
}

.tutorial-spotlight-mask.active {
    pointer-events: auto;
}

/* Highlighted element gets elevated z-index */
.tutorial-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px rgba(255, 214, 0, 0.6),
        0 0 20px rgba(255, 214, 0, 0.4) !important;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

/* Tutorial Tooltip */
.tutorial-tooltip {
    position: fixed;
    z-index: 100001;
    background: #172a45;
    border: 1px solid #FFD600;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.tutorial-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip Header */
.tutorial-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 214, 0, 0.1);
    border-bottom: 1px solid rgba(255, 214, 0, 0.2);
}

.tutorial-tooltip-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFD600;
    margin: 0;
}

.tutorial-tooltip-title .icon {
    font-size: 1.2rem;
}

.tutorial-tooltip-step {
    font-size: 0.85rem;
    color: #8892b0;
    background: rgba(136, 146, 176, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Tooltip Content */
.tutorial-tooltip-content {
    padding: 20px;
    color: #ccd6f6;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tutorial-tooltip-content p {
    margin: 0 0 12px 0;
}

.tutorial-tooltip-content p:last-child {
    margin-bottom: 0;
}

.tutorial-tooltip-content strong {
    color: #FFD600;
}

.tutorial-tooltip-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.tutorial-tooltip-content li {
    margin: 4px 0;
    color: #a8b2d1;
}

/* Tooltip Footer/Actions */
.tutorial-tooltip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tutorial-nav-left {
    display: flex;
    gap: 8px;
}

.tutorial-nav-right {
    display: flex;
    gap: 8px;
}

/* Tutorial Buttons */
.tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tutorial-btn-primary {
    background: linear-gradient(135deg, #FFD600 0%, #FFA000 100%);
    color: #0a1628;
}

.tutorial-btn-primary:hover {
    background: linear-gradient(135deg, #FFE033 0%, #FFB333 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 214, 0, 0.3);
}

.tutorial-btn-secondary {
    background: rgba(136, 146, 176, 0.15);
    color: #8892b0;
    border: 1px solid rgba(136, 146, 176, 0.2);
}

.tutorial-btn-secondary:hover {
    background: rgba(136, 146, 176, 0.25);
    color: #ccd6f6;
}

.tutorial-btn-skip {
    background: transparent;
    color: #8892b0;
    padding: 10px 12px;
}

.tutorial-btn-skip:hover {
    color: #ccd6f6;
    background: rgba(136, 146, 176, 0.1);
}

.tutorial-btn svg {
    width: 16px;
    height: 16px;
}

/* Tooltip Arrow */
.tutorial-tooltip-arrow {
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #1a2744 0%, #0d1829 100%);
    border: 1px solid rgba(255, 214, 0, 0.3);
    transform: rotate(45deg);
    z-index: -1;
}

.tutorial-tooltip[data-position="bottom"] .tutorial-tooltip-arrow {
    top: -9px;
    border-right: none;
    border-bottom: none;
}

.tutorial-tooltip[data-position="top"] .tutorial-tooltip-arrow {
    bottom: -9px;
    border-left: none;
    border-top: none;
}

.tutorial-tooltip[data-position="left"] .tutorial-tooltip-arrow {
    right: -9px;
    border-left: none;
    border-bottom: none;
}

.tutorial-tooltip[data-position="right"] .tutorial-tooltip-arrow {
    left: -9px;
    border-right: none;
    border-top: none;
}

/* Welcome Modal */
.tutorial-welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tutorial-welcome-modal.visible {
    opacity: 1;
    visibility: visible;
}

.tutorial-welcome-content {
    background: linear-gradient(145deg, #1a2744 0%, #0d1829 100%);
    border: 1px solid rgba(255, 214, 0, 0.2);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.tutorial-welcome-modal.visible .tutorial-welcome-content {
    transform: scale(1);
}

.tutorial-welcome-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: welcomeBounce 1s ease infinite;
}

@keyframes welcomeBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.tutorial-welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ccd6f6;
    margin: 0 0 12px 0;
}

.tutorial-welcome-subtitle {
    font-size: 1rem;
    color: #8892b0;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.tutorial-welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tutorial-welcome-actions .tutorial-btn {
    justify-content: center;
    padding: 14px 24px;
    font-size: 1rem;
}

/* Completion Modal */
.tutorial-complete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tutorial-complete-modal.visible {
    opacity: 1;
    visibility: visible;
}

.tutorial-complete-content {
    background: linear-gradient(145deg, #1a2744 0%, #0d1829 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.tutorial-complete-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.tutorial-complete-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #22c55e;
    margin: 0 0 12px 0;
}

.tutorial-complete-subtitle {
    font-size: 1rem;
    color: #8892b0;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* Progress Bar */
.tutorial-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 214, 0, 0.1);
    z-index: 10002;
}

.tutorial-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD600 0%, #FFA000 100%);
    transition: width 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tutorial-tooltip {
        max-width: calc(100vw - 40px);
        min-width: auto;
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
    }

    .tutorial-tooltip-arrow {
        display: none;
    }

    .tutorial-welcome-content,
    .tutorial-complete-content {
        margin: 20px;
        padding: 30px 20px;
    }

    .tutorial-welcome-title {
        font-size: 1.6rem;
    }

    .tutorial-tooltip-actions {
        flex-direction: column;
        gap: 10px;
    }

    .tutorial-nav-left,
    .tutorial-nav-right {
        width: 100%;
        justify-content: center;
    }
}