/* EDVC Mapper - Tutorial Styles */

.edvc-tutorial-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    background-color: white;
    border-radius: var(--edvc-border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    overflow: hidden;
    animation: edvcTutorialSlideIn 0.4s ease-out;
}

.edvc-tutorial-content {
    padding: 2rem;
}

.edvc-tutorial-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--edvc-text-primary);
    margin: 0 0 1rem 0;
    text-align: center;
}

.edvc-tutorial-video {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: var(--edvc-border-radius);
    overflow: hidden;
    background-color: #f8f9fa;
}

.edvc-tutorial-video video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

.edvc-tutorial-video.loading {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--edvc-text-secondary);
    font-style: italic;
}

.edvc-tutorial-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--edvc-text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.edvc-tutorial-progress {
    margin-bottom: 1.5rem;
}

.edvc-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e1e8ed;
    border-radius: 3px;
    overflow: hidden;
}

.edvc-progress-fill {
    height: 100%;
    background-color: var(--edvc-highlight);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.edvc-tutorial-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
}

.edvc-tutorial-controls .edvc-btn-secondary {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    font-size: 13px;
}

.edvc-tutorial-controls .edvc-btn-primary {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 13px;
}

/* Tutorial Step Counter */
.edvc-tutorial-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--edvc-bg-navbar);
    color: var(--edvc-text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Tutorial Overlay */
.edvc-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2500;
    pointer-events: none;
}

.edvc-tutorial-highlight {
    position: absolute;
    border: 3px solid var(--edvc-highlight);
    border-radius: var(--edvc-border-radius);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    animation: edvcTutorialPulse 2s infinite;
}

.edvc-tutorial-tooltip {
    position: absolute;
    background-color: var(--edvc-highlight);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--edvc-border-radius);
    font-size: 14px;
    font-weight: 500;
    max-width: 250px;
    z-index: 2600;
    box-shadow: var(--edvc-shadow);
}

.edvc-tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.edvc-tutorial-tooltip.top::before {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: var(--edvc-highlight) transparent transparent transparent;
}

.edvc-tutorial-tooltip.bottom::before {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent var(--edvc-highlight) transparent;
}

.edvc-tutorial-tooltip.left::before {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--edvc-highlight);
}

.edvc-tutorial-tooltip.right::before {
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--edvc-highlight) transparent transparent;
}

/* Tutorial Welcome Screen */
.edvc-tutorial-welcome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.edvc-tutorial-welcome-content {
    background-color: white;
    border-radius: var(--edvc-border-radius);
    padding: 3rem;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.edvc-tutorial-welcome h2 {
    color: var(--edvc-text-primary);
    margin-bottom: 1rem;
}

.edvc-tutorial-welcome p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.edvc-tutorial-welcome-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Tutorial Skip Button */
.edvc-tutorial-skip {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: var(--edvc-text-secondary);
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0.5rem;
    border-radius: var(--edvc-border-radius);
    transition: var(--edvc-transition);
}

.edvc-tutorial-skip:hover {
    color: var(--edvc-text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Tutorial Completion */
.edvc-tutorial-complete {
    text-align: center;
    padding: 2rem;
}

.edvc-tutorial-complete-icon {
    width: 80px;
    height: 80px;
    background-color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 32px;
}

.edvc-tutorial-complete h3 {
    color: #28a745;
    margin-bottom: 1rem;
}

.edvc-tutorial-complete p {
    margin-bottom: 2rem;
}

/* Animations */
@keyframes edvcTutorialSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes edvcTutorialSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes edvcTutorialPulse {
    0% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 0 0 rgba(0, 124, 186, 0.7);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 0 10px rgba(0, 124, 186, 0.3);
    }
    100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 0 0 rgba(0, 124, 186, 0);
    }
}

/* Tutorial States */
.edvc-tutorial-popup.closing {
    animation: edvcTutorialSlideOut 0.4s ease-out forwards;
}

.edvc-tutorial-popup.minimized {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: var(--edvc-transition);
}

.edvc-tutorial-popup.minimized .edvc-tutorial-content {
    display: none;
}

.edvc-tutorial-popup.minimized::before {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: var(--edvc-highlight);
}

.edvc-tutorial-popup.minimized:hover {
    background-color: var(--edvc-highlight);
}

.edvc-tutorial-popup.minimized:hover::before {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .edvc-tutorial-popup {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
    }
    
    .edvc-tutorial-content {
        padding: 1.5rem;
    }
    
    .edvc-tutorial-content h3 {
        font-size: 16px;
    }
    
    .edvc-tutorial-video {
        margin-bottom: 1rem;
    }
    
    .edvc-tutorial-video video {
        max-height: 150px;
    }
    
    .edvc-tutorial-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .edvc-tutorial-controls .edvc-btn-primary,
    .edvc-tutorial-controls .edvc-btn-secondary {
        width: 100%;
        flex: none;
    }
    
    .edvc-tutorial-tooltip {
        max-width: 200px;
        font-size: 12px;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .edvc-tutorial-popup {
        width: calc(100vw - 1rem);
        right: 0.5rem;
        bottom: 0.5rem;
        left: 0.5rem;
    }
    
    .edvc-tutorial-content {
        padding: 1rem;
    }
    
    .edvc-tutorial-welcome-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .edvc-tutorial-welcome-actions {
        flex-direction: column;
    }
    
    .edvc-tutorial-video.loading {
        height: 120px;
    }
    
    .edvc-tutorial-video video {
        max-height: 120px;
    }
}

/* High DPI Displays */
@media (min-width: 1920px) {
    .edvc-tutorial-popup {
        width: 480px;
        bottom: 3rem;
        right: 3rem;
    }
    
    .edvc-tutorial-content {
        padding: 2.5rem;
    }
    
    .edvc-tutorial-content h3 {
        font-size: 20px;
    }
    
    .edvc-tutorial-text {
        font-size: 16px;
    }
    
    .edvc-tutorial-video video {
        max-height: 240px;
    }
    
    .edvc-tutorial-welcome-content {
        padding: 4rem;
        max-width: 700px;
    }
}

/* Print Styles */
@media print {
    .edvc-tutorial-popup,
    .edvc-tutorial-overlay,
    .edvc-tutorial-welcome {
        display: none !important;
    }
}