﻿/* Interactive User Onboarding & Tutorial System Styles */

/* Shepherd.js Theme Overrides */
.shepherd-theme-dark {
    --shepherd-theme-primary: #007bff;
    --shepherd-theme-secondary: #6c757d;
    --shepherd-text-background: rgba(0, 0, 0, 0.9);
    --shepherd-text-color: #ffffff;
}

.shepherd-theme-light {
    --shepherd-theme-primary: #007bff;
    --shepherd-theme-secondary: #6c757d;
    --shepherd-text-background: rgba(255, 255, 255, 0.95);
    --shepherd-text-color: #212529;
}

/* Custom tutorial step styling */
.embeddedjobs-tutorial-step .shepherd-content {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: none;
    max-width: 400px;
}

.embeddedjobs-tutorial-step .shepherd-header {
    background: linear-gradient(135deg, var(--shepherd-theme-primary), #0056b3);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 16px 20px;
    margin: -8px -8px 0 -8px;
}

.embeddedjobs-tutorial-step .shepherd-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.embeddedjobs-tutorial-step .shepherd-text {
    padding: 20px;
    line-height: 1.6;
    font-size: 15px;
}

.embeddedjobs-tutorial-step .shepherd-text p {
    margin: 0 0 12px 0;
}

.embeddedjobs-tutorial-step .shepherd-text ul {
    margin: 12px 0;
    padding-left: 20px;
}

.embeddedjobs-tutorial-step .shepherd-text li {
    margin-bottom: 6px;
}

.embeddedjobs-tutorial-step .shepherd-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(248, 249, 250, 0.5);
    border-radius: 0 0 12px 12px;
}

.embeddedjobs-tutorial-step .shepherd-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.embeddedjobs-tutorial-step .shepherd-button:last-child {
    margin-right: 0;
}

.embeddedjobs-tutorial-step .shepherd-button-primary {
    background: var(--shepherd-theme-primary);
    color: white;
}

.embeddedjobs-tutorial-step .shepherd-button-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.embeddedjobs-tutorial-step .shepherd-button-secondary {
    background: transparent;
    color: var(--shepherd-theme-secondary);
    border: 1px solid var(--shepherd-theme-secondary);
}

.embeddedjobs-tutorial-step .shepherd-button-secondary:hover {
    background: var(--shepherd-theme-secondary);
    color: white;
}

/* Cancel icon styling */
.embeddedjobs-tutorial-step .shepherd-cancel-icon {
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    transition: color 0.2s ease;
}

.embeddedjobs-tutorial-step .shepherd-cancel-icon:hover {
    color: white;
}

/* Modal overlay */
.shepherd-modal-overlay-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

/* Element highlighting */
.tutorial-highlight {
    position: relative;
    z-index: 9999;
}

.tutorial-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #007bff, #28a745, #ffc107, #dc3545);
    border-radius: 8px;
    z-index: -1;
    animation: tutorial-pulse 2s infinite;
}

@keyframes tutorial-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

/* Progress indicator */
.tutorial-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 20px;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-progress-bar {
    width: 100px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.tutorial-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tutorial-progress-text {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Completion message */
.tutorial-completion-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: slideInRight 0.5s ease;
    max-width: 300px;
}

.tutorial-completion-message strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.tutorial-completion-message small {
    opacity: 0.9;
    font-size: 14px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Tooltip styles */
.tutorial-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    pointer-events: none;
    max-width: 250px;
    word-wrap: break-word;
}

.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

/* Tooltip arrow positioning */
.tutorial-tooltip[data-position='top']::before {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tutorial-tooltip[data-position='bottom']::before {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

.tutorial-tooltip[data-position='left']::before {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: rgba(0, 0, 0, 0.9);
}

.tutorial-tooltip[data-position='right']::before {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: rgba(0, 0, 0, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .embeddedjobs-tutorial-step .shepherd-content {
        max-width: 90vw;
        margin: 20px;
    }

    .embeddedjobs-tutorial-step .shepherd-text {
        padding: 16px;
        font-size: 14px;
    }

    .tutorial-progress {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }

    .tutorial-progress-bar {
        width: 80px;
    }

    .tutorial-completion-message {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tutorial-progress {
        background: #2d3748;
        color: #e2e8f0;
    }

    .tutorial-tooltip {
        background: rgba(45, 55, 72, 0.9);
    }
}

/* Animation utilities */
.tutorial-fade-in {
    animation: tutorialFadeIn 0.3s ease;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tutorial-bounce {
    animation: tutorialBounce 0.6s ease;
}

@keyframes tutorialBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Accessibility improvements */
.shepherd-element *:focus {
    outline: 2px solid var(--shepherd-theme-primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .embeddedjobs-tutorial-step .shepherd-content {
        border: 2px solid;
    }

    .tutorial-tooltip {
        border: 1px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tutorial-highlight::before,
    .tutorial-progress-fill,
    .tutorial-completion-message,
    .tutorial-fade-in,
    .tutorial-bounce {
        animation: none;
    }

    .embeddedjobs-tutorial-step .shepherd-button {
        transition: none;
    }
}
