/* Guided Tour CSS Styles */

/* Tour Overlay - Container for all overlay elements */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    display: none;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Tour Overlay Sections - Create the dimming effect around the highlighted area */
.tour-overlay-section {
    position: absolute;
    background: rgba(0, 0, 0, 0.75);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.tour-overlay-top {
    /* Covers the area above the spotlight */
}

.tour-overlay-bottom {
    /* Covers the area below the spotlight */
}

.tour-overlay-left {
    /* Covers the area to the left of the spotlight */
}

.tour-overlay-right {
    /* Covers the area to the right of the spotlight */
}

/* Tour Spotlight - Creates the highlighted border without any dimming */
.tour-spotlight {
    position: absolute;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    border: 3px solid #3498db;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
    background: transparent;
    z-index: 9999;
}

/* Tour Modal - Contains the tour content */
.tour-modal {
    position: fixed;
    z-index: 9999;
    display: none;
    max-width: 400px;
    min-width: 300px;
}

.tour-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: tourFadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes tourFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Tour Header */
.tour-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 20px 20px 0 20px;
    position: relative;
}

.tour-title {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding-right: 30px;
}

.tour-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tour-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #495057;
}

/* Tour Body */
.tour-body {
    padding: 15px 20px 20px 20px;
}

.tour-description {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Tour Footer */
.tour-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

/* Tour Progress */
.tour-progress {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.tour-step-counter {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-right: 10px;
    min-width: 80px;
}

.tour-progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.tour-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Tour Controls */
.tour-controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.tour-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tour-btn-primary {
    background: #3498db;
    color: white;
}

.tour-btn-primary:hover {
    background: #2980b9;
}

.tour-btn-secondary {
    background: #6c757d;
    color: white;
}

.tour-btn-secondary:hover {
    background: #5a6268;
}

.tour-btn-success {
    background: #27ae60;
    color: white;
}

.tour-btn-success:hover {
    background: #219a52;
}

/* Tour Highlight - Applied to highlighted elements */
.tour-highlight {
    position: relative;
    z-index: 9997 !important;
}

.tour-highlight::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #3498db;
    border-radius: 6px;
    pointer-events: none;
    animation: tourPulse 2s infinite;
    z-index: 1;
}

@keyframes tourPulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Tour Trigger Button */
.tour-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-trigger:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.tour-trigger i {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tour-modal {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        top: auto;
        max-width: none;
        min-width: auto;
    }
    
    .tour-modal-content {
        border-radius: 12px;
    }
    
    .tour-spotlight {
        border-radius: 4px;
    }
    
    .tour-trigger {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .tour-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .tour-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .tour-modal {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .tour-trigger {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .tour-header {
        padding: 15px 15px 0 15px;
    }
    
    .tour-body {
        padding: 10px 15px 15px 15px;
    }
    
    .tour-footer {
        padding: 12px 15px;
    }
}

/* Animation for tour elements entering/leaving */
.tour-overlay.entering {
    animation: tourOverlayFadeIn 0.3s ease;
}

.tour-overlay.leaving {
    animation: tourOverlayFadeOut 0.3s ease;
}

@keyframes tourOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tourOverlayFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Hide tour trigger when tour is active */
body.tour-active .tour-trigger {
    display: none !important;
}

/* Ensure proper stacking context */
.navbar,
.dropdown-menu {
    position: relative;
    z-index: 1030;
}

/* Override Bootstrap z-index for tour */
.tour-overlay {
    z-index: 9998 !important;
}

.tour-modal {
    z-index: 9999 !important;
}