/**
 * FleetStreet Tour Styles
 * Custom styling for Shepherd.js tours and tour components
 */

/* ========================================
   Shepherd.js Tour Customization
   ======================================== */

/* Tour step styling */
.shepherd-element {
    z-index: 10000 !important;
}

.shepherd-modal-overlay-container {
    z-index: 9999 !important;
    backdrop-filter: blur(3px);
}

.shepherd-step-custom {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
                0 10px 20px -5px rgba(59, 130, 246, 0.1),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    max-width: 450px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 2px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.shepherd-step-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.dark .shepherd-step-custom {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 10px 20px -5px rgba(139, 92, 246, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.shepherd-header {
    padding: 20px 20px 0 20px;
}

.shepherd-title {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.dark .shepherd-title {
    background: linear-gradient(135deg, #60A5FA, #A78BFA, #F472B6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shepherd-text {
    padding: 15px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    font-weight: 400;
}

.dark .shepherd-text {
    color: #CBD5E1;
}

.shepherd-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Shepherd buttons */
.shepherd-button {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.shepherd-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.shepherd-button:hover::before {
    width: 300px;
    height: 300px;
}

.shepherd-button-primary {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.shepherd-button-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.shepherd-button-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

.dark .shepherd-button-secondary {
    background: rgba(71, 85, 105, 0.3);
    color: #E2E8F0;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

.shepherd-button-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    transform: translateY(-1px);
}

.dark .shepherd-button-secondary:hover {
    background: rgba(71, 85, 105, 0.5);
}

.shepherd-button-success {
    background: linear-gradient(135deg, #10B981, #34D399, #6EE7B7);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: gradient-shift 3s ease infinite;
}

.shepherd-button-success:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

/* Cancel icon */
.shepherd-cancel-icon {
    width: 24px;
    height: 24px;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.2s ease;
}

.shepherd-cancel-icon:hover {
    color: #6B7280;
}

/* Arrow positioning */
.shepherd-arrow {
    display: none;
}

/* Modal overlay */
.shepherd-modal-overlay-container {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Highlighted element */
.tour-highlight {
    position: relative;
    z-index: 9998 !important;
    animation: tour-pulse 2s ease-in-out infinite, tour-glow 2s ease-in-out infinite;
}

@keyframes tour-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7),
                    0 0 20px 0 rgba(139, 92, 246, 0.5),
                    inset 0 0 20px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0),
                    0 0 30px 0 rgba(139, 92, 246, 0.3),
                    inset 0 0 30px rgba(59, 130, 246, 0.05);
    }
}

@keyframes tour-glow {
    0%, 100% {
        filter: brightness(1.05) saturate(1.2);
    }
    50% {
        filter: brightness(1.15) saturate(1.4);
    }
}

/* Premium highlight for interactive elements */
.tour-highlight-premium {
    position: relative;
    z-index: 9998 !important;
    animation: tour-pulse-premium 2s ease-in-out infinite !important;
    transition: all 0.3s ease !important;
}

@keyframes tour-pulse-premium {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.8),
                    0 0 30px 5px rgba(59, 130, 246, 0.6),
                    0 0 50px 10px rgba(236, 72, 153, 0.4),
                    inset 0 0 30px rgba(139, 92, 246, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(139, 92, 246, 0),
                    0 0 40px 10px rgba(59, 130, 246, 0.4),
                    0 0 60px 15px rgba(236, 72, 153, 0.2),
                    inset 0 0 40px rgba(139, 92, 246, 0.1);
        transform: scale(1.02);
    }
}

.tour-highlight-premium:hover {
    transform: scale(1.03) !important;
    filter: brightness(1.1) !important;
}

/* ========================================
   Tour Completion Modal
   ======================================== */

.tour-completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-completion-modal.show {
    opacity: 1;
}

.tour-completion-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 50px;
    max-width: 550px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35),
                0 10px 40px rgba(59, 130, 246, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.tour-completion-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(59, 130, 246, 0.1), transparent 30%);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-20px) scale(1.1); }
    50% { transform: translateY(0) scale(0.95); }
    75% { transform: translateY(-10px) scale(1.05); }
}

.tour-completion-modal.show .tour-completion-content {
    transform: scale(1);
}

.dark .tour-completion-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6),
                0 10px 40px rgba(139, 92, 246, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark .tour-completion-content::before {
    background: conic-gradient(from 0deg, transparent, rgba(139, 92, 246, 0.15), transparent 30%);
}

.tour-completion-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.tour-completion-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.dark .tour-completion-title {
    color: #F3F4F6;
}

.tour-completion-text {
    font-size: 16px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 30px;
}

.dark .tour-completion-text {
    color: #D1D5DB;
}

.tour-completion-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.tour-completion-buttons .btn-primary,
.tour-completion-buttons .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.tour-completion-buttons .btn-primary {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
}

.tour-completion-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tour-completion-buttons .btn-secondary {
    background: #E5E7EB;
    color: #374151;
}

.dark .tour-completion-buttons .btn-secondary {
    background: #374151;
    color: #D1D5DB;
}

.tour-completion-buttons .btn-secondary:hover {
    background: #D1D5DB;
}

/* ========================================
   Tour Role Switcher
   ======================================== */

.tour-role-switcher {
    position: fixed;
    bottom: 24px;
    right: 100px;
    z-index: 9997;
}

.tour-role-switcher-btn {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tour-role-switcher-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tour-role-switcher-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 320px;
    max-height: 600px;
    overflow-y: auto;
}

.dark .tour-role-switcher-menu {
    background: #1F2937;
    border: 1px solid #374151;
}

.tour-role-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.dark .tour-role-switcher-header {
    border-bottom-color: #374151;
}

.tour-role-switcher-current {
    padding: 16px;
    background: #F3F4F6;
    border-radius: 8px;
    margin: 12px;
}

.dark .tour-role-switcher-current {
    background: #374151;
}

.tour-role-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.tour-role-switcher-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0 12px;
}

.dark .tour-role-switcher-divider {
    background: #374151;
}

.tour-role-switcher-roles {
    padding: 12px;
}

.tour-role-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.tour-role-option:hover {
    background: #F3F4F6;
}

.dark .tour-role-option:hover {
    background: #374151;
}

.tour-role-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tour-role-option-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.dark .tour-role-option-name {
    color: #F3F4F6;
}

.tour-role-switcher-footer {
    padding: 12px;
    border-top: 1px solid #E5E7EB;
}

.dark .tour-role-switcher-footer {
    border-top-color: #374151;
}

.tour-role-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: #F3F4F6;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dark .tour-role-back-btn {
    background: #374151;
    color: #D1D5DB;
}

.tour-role-back-btn:hover {
    background: #E5E7EB;
}

.dark .tour-role-back-btn:hover {
    background: #4B5563;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .shepherd-step-custom {
        max-width: 90vw;
    }

    .tour-role-switcher {
        bottom: 16px;
        right: 16px;
    }

    .tour-role-switcher-menu {
        right: 0;
        width: 280px;
    }

    .tour-completion-content {
        margin: 20px;
        padding: 30px;
    }
}

/* ========================================
   Animations
   ======================================== */

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

.shepherd-element {
    animation: fade-in 0.3s ease;
}

/* ========================================
   Accessibility
   ======================================== */

.shepherd-button:focus,
.tour-role-option:focus,
.tour-role-switcher-btn:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .shepherd-step-custom {
        border: 2px solid currentColor;
    }

    .shepherd-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .shepherd-element,
    .tour-highlight,
    .tour-completion-modal,
    .tour-role-switcher-btn,
    .tour-role-option {
        animation: none;
        transition: none;
    }
}

/* ========================================
   Feature Explainer Modal
   ======================================== */

.feature-explainer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.feature-explainer-modal.show {
    opacity: 1;
}

.feature-explainer-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35),
                0 10px 40px rgba(59, 130, 246, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 2px solid rgba(139, 92, 246, 0.2);
    overflow: hidden;
}

.feature-explainer-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
}

.dark .feature-explainer-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(139, 92, 246, 0.4);
}

.feature-explainer-modal.show .feature-explainer-content {
    transform: scale(1) translateY(0);
}

.feature-explainer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6B7280;
}

.feature-explainer-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.dark .feature-explainer-close {
    background: rgba(255, 255, 255, 0.1);
    color: #D1D5DB;
}

.feature-explainer-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: bounce 1s ease;
}

.feature-explainer-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.feature-explainer-description {
    font-size: 16px;
    line-height: 1.7;
    color: #475569;
    text-align: center;
    margin-bottom: 24px;
}

.dark .feature-explainer-description {
    color: #CBD5E1;
}

.feature-explainer-benefits {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.dark .feature-explainer-benefits {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-explainer-benefits h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #3B82F6;
}

.dark .feature-explainer-benefits h3 {
    color: #A78BFA;
}

.feature-explainer-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-explainer-benefits li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 14px;
    color: #475569;
}

.dark .feature-explainer-benefits li {
    color: #CBD5E1;
}

.feature-explainer-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10B981;
    font-weight: bold;
    font-size: 16px;
}

.feature-explainer-roles {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6B7280;
}

.dark .feature-explainer-roles {
    color: #9CA3AF;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.feature-explainer-cta {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
    border: 2px dashed rgba(16, 185, 129, 0.3);
}

.feature-explainer-cta p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #059669;
}

.dark .feature-explainer-cta p {
    color: #6EE7B7;
}

.feature-explainer-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-explainer-buttons .btn-primary,
.feature-explainer-buttons .btn-secondary {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.feature-explainer-buttons .btn-primary {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.feature-explainer-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.feature-explainer-buttons .btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
    border: 2px solid rgba(148, 163, 184, 0.3);
}

.dark .feature-explainer-buttons .btn-secondary {
    background: rgba(71, 85, 105, 0.3);
    color: #E2E8F0;
}

.feature-explainer-buttons .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .shepherd-element,
    .tour-role-switcher,
    .tour-completion-modal,
    .feature-explainer-modal {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .feature-explainer-content {
        padding: 30px 20px;
    }
    
    .feature-explainer-title {
        font-size: 22px;
    }
    
    .feature-explainer-buttons {
        flex-direction: column;
    }
    
    .feature-explainer-buttons .btn-primary,
    .feature-explainer-buttons .btn-secondary {
        width: 100%;
    }
}


