/**
 * 🎓 Interactive Tour Styling
 * Phase 6: UX Polish - Custom styles for Shepherd.js tour
 * Integrates with Horizon CRM's Bootstrap 5 theme
 */

/* ===== Tour Overlay & Modal ===== */
.shepherd-modal-overlay-container {
    z-index: 9998 !important; /* Below tour tooltip but above page content */
}

.shepherd-element {
    z-index: 9999 !important; /* Tour tooltip above everything */
    max-width: 420px;
}

/* ===== Tour Header ===== */
.shepherd-header {
    padding: 1rem 1.25rem !important;
    background: #0d6efd !important;
    color: white !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.shepherd-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: white !important;
}

.shepherd-cancel-icon {
    color: white !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s !important;
}

.shepherd-cancel-icon:hover {
    opacity: 1 !important;
}

/* ===== Tour Content ===== */
.shepherd-text {
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

.shepherd-text p {
    margin-bottom: 0.75rem;
}

.shepherd-text p:last-child {
    margin-bottom: 0;
}

/* Emoji support */
.shepherd-text strong {
    color: #667eea;
}

/* ===== Tour Footer ===== */
.shepherd-footer {
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

/* ===== Tour Buttons ===== */
.shepherd-button {
    border-radius: 0.375rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

/* Primary button (Next) */
.shepherd-button.btn-primary {
    background-color: #667eea;
    color: white;
}

.shepherd-button.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Success button (Finish) */
.shepherd-button.btn-success {
    background-color: #28a745;
    color: white;
}

.shepherd-button.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Secondary button (Back) */
.shepherd-button.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.shepherd-button.btn-secondary:hover {
    background-color: #5a6268;
}

/* Outline button (Skip) */
.shepherd-button.btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.shepherd-button.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* ===== Tour Arrow ===== */
.shepherd-arrow {
    z-index: 10000;
}

.shepherd-arrow::before {
    background-color: #667eea;
}

/* ===== Highlighted Element ===== */
.shepherd-target {
    animation: shepherd-pulse 2s infinite;
}

@keyframes shepherd-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
    .shepherd-element {
        max-width: 90vw;
        margin: 1rem;
    }
    
    .shepherd-header {
        padding: 0.875rem 1rem;
    }
    
    .shepherd-title {
        font-size: 1rem;
    }
    
    .shepherd-text {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .shepherd-footer {
        padding: 0.625rem 1rem;
        flex-wrap: wrap;
    }
    
    .shepherd-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ===== Dark Mode Support (Future Enhancement) ===== */
@media (prefers-color-scheme: dark) {
    .shepherd-text {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .shepherd-footer {
        background-color: #2d2d2d;
    }
}

/* ===== Progress Indicator (Custom) ===== */
.tour-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    z-index: 9997;
    display: none; /* Hide by default, show via JS if needed */
}

.tour-progress-bar {
    width: 100px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.tour-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* ===== Restart Tour Button (for Settings page) ===== */
.restart-tour-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.restart-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.restart-tour-btn i {
    font-size: 1.1rem;
}
