/**
 * PPV Tour System Styles - Friendly Compact Version
 */

/* NO OVERLAY - Clean and non-intrusive */

/* Tour Highlight - More visible and friendly */
.tour-highlight {
    position: relative;
    z-index: 1000 !important;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tour-highlight-box {
    pointer-events: none;
    border: 3px solid #3b82f6;
    border-radius: 12px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(147, 51, 234, 0.08) 100%);
    animation: tour-pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
    position: fixed;
    z-index: 1001;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3),
                inset 0 0 20px rgba(59, 130, 246, 0.1);
}

@keyframes tour-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6),
                    0 0 40px rgba(59, 130, 246, 0.3);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0),
                    0 0 60px rgba(59, 130, 246, 0.4);
    }
}

/* Compact User-Friendly Tooltip */
.tour-tooltip {
    position: fixed;
    z-index: 1002;
    max-width: 260px;
    min-width: 220px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.tour-tooltip.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: tooltipBounce 0.5s ease-out;
}

@keyframes tooltipBounce {
    0% {
        transform: translateY(-20px) scale(0.9);
        opacity: 0;
    }
    50% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.tour-tooltip-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 16px 14px 12px 14px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
}

/* Dark mode support */
.dark-mode .tour-tooltip-content {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

/* Friendly Arrow */
.tour-tooltip-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transform: rotate(45deg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.03);
}

.dark-mode .tour-tooltip-arrow {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
}

.tour-tooltip-arrow-top {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-top: none;
    border-left: none;
}

.tour-tooltip-arrow-bottom {
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-bottom: none;
    border-right: none;
}

.tour-tooltip-arrow-left {
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border-left: none;
    border-bottom: none;
}

.tour-tooltip-arrow-right {
    left: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border-right: none;
    border-top: none;
}

/* Compact Step Counter */
.tour-step-number {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 15px;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.tour-step-number::before {
    content: '📍';
    font-size: 12px;
}

.tour-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-mode .tour-title {
    color: #f9fafb;
}

.tour-intro {
    font-size: 12px;
    line-height: 1.4;
    color: #475569;
    margin: 0 0 12px 0;
    font-weight: 400;
}

.dark-mode .tour-intro {
    color: #d1d5db;
}

.tour-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mini Progress Bar */
.tour-progress {
    height: 2px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.tour-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Force header elements to NOT interfere with tour */
.modern-profile-header {
    position: relative !important;
    z-index: 10 !important;
}

.modern-profile-header * {
    position: relative !important;
}

/* Ensure tour elements are always on top */
.tour-tooltip {
    z-index: 9999 !important;
}

.tour-highlight-box {
    z-index: 9998 !important;
}

.tour-highlight {
    z-index: 9997 !important;
}

/* Compact Friendly Buttons */
.tour-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 12px;
}

.tour-btn {
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

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

.tour-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.tour-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
    z-index: 1;
}

.tour-btn-primary:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.tour-btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.tour-btn-secondary:hover {
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
}

.dark-mode .tour-btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.tour-btn-ghost {
    background: transparent;
    color: #94a3b8;
    padding: 6px 10px;
    font-size: 11px;
}

.tour-btn-ghost:hover {
    color: #64748b;
    background: rgba(148, 163, 184, 0.08);
}

.tour-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.tour-btn-success:hover {
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

/* Compact Completion Message */
.tour-completion-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 1003;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.tour-completion-message.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.tour-completion-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    min-width: 240px;
    max-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tour-completion-message.rtl .tour-completion-content {
    text-align: right;
    direction: rtl;
}

.tour-completion-content i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.tour-completion-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: white;
}

.tour-completion-content p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.3;
}

/* Persistent Tour Button */
.tour-persistent-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 1000 !important;
    padding: 8px 12px !important;
    border-radius: 20px !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    white-space: nowrap !important;
}

.tour-persistent-button:hover {
    transform: translateY(-2px) !important;
}

.tour-persistent-button.rtl {
    left: 20px !important;
    right: auto !important;
}

/* Improved Mobile Responsiveness */
@media (max-width: 768px) {
    .tour-tooltip {
        max-width: calc(100vw - 20px) !important;
        min-width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        transform: translateX(0) !important;
    }
    
    .tour-tooltip-content {
        padding: 20px;
        margin: 0;
    }
    
    .tour-title {
        font-size: 18px;
        line-height: 1.3;
    }
    
    .tour-intro {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .tour-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .tour-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .tour-restart-button {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
        border-radius: 50px;
    }
    
    .tour-restart-button span {
        display: none;
    }
    
    /* Better highlight on mobile */
    .tour-highlight-box {
        border-width: 2px;
    }
    
    /* Ensure tooltips don't overflow */
    .tour-tooltip-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .tour-tooltip {
        max-width: calc(100vw - 16px) !important;
        min-width: calc(100vw - 16px) !important;
        left: 8px !important;
    }
    
    .tour-tooltip-content {
        padding: 16px;
    }
    
    .tour-title {
        font-size: 16px;
    }
    
    .tour-intro {
        font-size: 13px;
    }
    
    .tour-step-number {
        font-size: 11px;
    }
}

/* Animations */
@keyframes tourSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Feature Highlights (for specific features) */
.feature-highlight {
    position: relative;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: featurePulse 2s infinite;
}

@keyframes featurePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Tooltip Variants */
.tour-tooltip.tour-tooltip-small .tour-tooltip-content {
    padding: 16px;
    max-width: 280px;
}

.tour-tooltip.tour-tooltip-large .tour-tooltip-content {
    max-width: 600px;
}

/* Special styles for different user types */
.tour-agency .tour-progress-bar {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.tour-creator .tour-progress-bar {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.tour-brand .tour-progress-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}