/* Tutorial Styles */
.shepherd-modal-overlay-container {
    filter: blur(4px);
    opacity: 0.5;
    transition: all 0.3s ease;
    pointer-events: all;
}

/* Special handling for steps with navigation elements */
.shepherd-has-navigation-element + .shepherd-modal-overlay-container {
    display: none;
}

.shepherd-highlight {
    position: relative;
    z-index: 99999 !important;
    cursor: pointer !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    pointer-events: all !important;
}

/* Ensure highlighted navigation elements are always clickable */
.shepherd-highlight.nav-link,
a[href].shepherd-highlight,
a[href="/users"] {
    pointer-events: all !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 99999 !important;
}

/* Remove pointer events from modal overlay */
.shepherd-modal-overlay-container {
    pointer-events: none !important;
}

.shepherd-highlight:hover {
    transform: scale(1.05);
}

.shepherd-element {
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    z-index: 99999;
}

.shepherd-header {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.shepherd-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.shepherd-text {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
}

.shepherd-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shepherd-button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.shepherd-button-primary {
    background: #4299e1;
    color: white;
}

.shepherd-button-primary:hover {
    background: #3182ce;
}

.shepherd-button-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.shepherd-button-secondary:hover {
    background: #cbd5e0;
}

.shepherd-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.shepherd-progress-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.shepherd-progress-bar-fill {
    height: 100%;
    background: #4299e1;
    transition: width 0.3s ease;
}

.shepherd-progress-text {
    font-size: 0.8rem;
    color: #718096;
}

.shepherd-highlight {
    position: relative;
    z-index: 10000;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: auto !important;
}

.shepherd-skip-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: #718096;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.shepherd-skip-button:hover {
    background: #e2e8f0;
    color: #4a5568;
}

/* Animation for highlighted elements */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(66, 153, 225, 0), 0 0 0 9999px rgba(0, 0, 0, 0.5); }
    100% { box-shadow: 0 0 0 0 rgba(66, 153, 225, 0), 0 0 0 9999px rgba(0, 0, 0, 0.5); }
}

.shepherd-highlight-pulse {
    animation: pulse 2s infinite;
}

/* Mobile-specific tutorial styles */
@media (max-width: 768px) {
    .shepherd-element {
        max-width: calc(100vw - 40px) !important;
        width: calc(100vw - 40px) !important;
        margin: 0 20px;
        font-size: 0.9rem;
    }
    
    .shepherd-text {
        padding: 0.75rem;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .shepherd-text h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .shepherd-text ul {
        margin-bottom: 0.5rem;
        padding-left: 1.2rem;
    }
    
    .shepherd-text li {
        margin-bottom: 0.25rem;
    }
    
    .shepherd-footer {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .shepherd-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 70px;
    }
    
    /* Ensure modals don't overlap with highlighted elements on mobile */
    .shepherd-element[data-popper-placement^="top"] {
        margin-bottom: 15px;
    }
    
    .shepherd-element[data-popper-placement^="bottom"] {
        margin-top: 15px;
    }
    
    /* Better spacing for mobile highlights */
    .shepherd-highlight {
        box-shadow: 0 0 0 5px rgba(66, 153, 225, 0.3), 0 0 0 9999px rgba(0, 0, 0, 0.6);
    }
    
    /* Mobile pulse animation with smaller shadow */
    @keyframes mobile-pulse {
        0% { box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.6); }
        70% { box-shadow: 0 0 0 8px rgba(66, 153, 225, 0), 0 0 0 9999px rgba(0, 0, 0, 0.6); }
        100% { box-shadow: 0 0 0 0 rgba(66, 153, 225, 0), 0 0 0 9999px rgba(0, 0, 0, 0.6); }
    }
    
    .shepherd-highlight-pulse {
        animation: mobile-pulse 2s infinite;
    }
    
    /* Adjust modal overlay for mobile */
    .shepherd-modal-overlay-container {
        opacity: 0.7;
    }
    
    /* Better positioning for navigation elements on mobile */
    .sidebar .shepherd-highlight,
    .nav-link.shepherd-highlight {
        box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.6);
    }
    
    /* Hamburger menu button highlighting */
    #sidebar-toggle.shepherd-highlight {
        box-shadow: 0 0 0 5px rgba(66, 153, 225, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.6);
        border-radius: 4px;
        z-index: 99999 !important;
        position: relative !important;
    }
    
    #sidebar-toggle.shepherd-highlight-pulse {
        animation: mobile-pulse 2s infinite;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .shepherd-element {
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        margin: 0 10px;
    }
    
    .shepherd-text {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .shepherd-text h5 {
        font-size: 0.95rem;
    }
    
    .shepherd-footer {
        padding: 0.4rem 0.5rem;
    }
    
    .shepherd-button {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
        min-width: 60px;
    }
}
