/* Modern PayPal-inspired Tour Styles - Consistent with Project Theme */
#tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.7) 0%, rgba(var(--bs-dark-rgb), 0.7) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.tour-step {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    min-height: 300px;
    max-height: 85vh;
    width: 100%;
    margin: auto;
    overflow: visible !important;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.05), 0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    z-index: 10004;
}

.tour-step.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Tour Header */
.tour-header {
    background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.8) 100%);
    color: white;
    padding: 24px 32px 20px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tour-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

.tour-logo {
    max-width: 120px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.tour-step h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    position: relative;
    z-index: 1;
}

.tour-step .tour-subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Tour Content */
.tour-content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 120px;
    padding: 32px;
    background: var(--bs-secondary-bg);
}

.tour-step p {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--bs-body-color);
    line-height: 1.6;
    font-weight: 400;
}

.tour-step p strong {
    color: var(--bs-primary);
    font-weight: 600;
}

.tour-step small {
    color: var(--bs-secondary-color);
    font-size: 14px;
    line-height: 1.4;
}

/* Modern Progress Bar */
.tour-progress-container {
    padding: 0 32px 24px;
    background: var(--bs-secondary-bg);
    flex-shrink: 0;
}

.tour-progress {
    width: 100%;
    background-color: var(--bs-border-color);
    border-radius: 12px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.tour-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-success) 100%);
    border-radius: 12px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tour-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Modern Buttons */
.tour-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 10010;
    padding: 24px 32px;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
}

.tour-step .btn {
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
}

.tour-step .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tour-step .btn:hover::before {
    left: 100%;
}

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

.tour-step .btn:active {
    transform: translateY(0);
}

.tour-step .btn.tour-next-btn {
    background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.8) 100%);
    color: white;
}

.tour-step .btn.tour-next-btn:hover {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.8) 0%, rgba(var(--bs-primary-rgb), 0.6) 100%);
}

.tour-step .btn.back-btn {
    background: var(--bs-secondary);
    color: white;
}

.tour-step .btn.back-btn:hover {
    background: rgba(var(--bs-secondary-rgb), 0.8);
}

.tour-step .btn.finish-btn {
    background: linear-gradient(135deg, var(--bs-success) 0%, rgba(var(--bs-success-rgb), 0.8) 100%);
    color: white;
}

.tour-step .btn.finish-btn:hover {
    background: linear-gradient(135deg, rgba(var(--bs-success-rgb), 0.8) 0%, rgba(var(--bs-success-rgb), 0.6) 100%);
}

.tour-step .btn:disabled {
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tour-step .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Close Button */
.tour-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10005;
}

.tour-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Form Elements */
.tour-step input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bs-border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.tour-step input[type="number"]:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

/* Links */
.tour-step a {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tour-step a:hover {
    color: rgba(var(--bs-primary-rgb), 0.8);
    text-decoration: underline;
}

/* Button styles for links */
.tour-step .btn-outline-primary {
    background: transparent;
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tour-step .btn-outline-primary:hover {
    background: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), 0.2);
}

.tour-step .btn-success {
    background: linear-gradient(135deg, var(--bs-success) 0%, rgba(var(--bs-success-rgb), 0.8) 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.tour-step .btn-success:hover {
    background: linear-gradient(135deg, rgba(var(--bs-success-rgb), 0.8) 0%, rgba(var(--bs-success-rgb), 0.6) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--bs-success-rgb), 0.2);
    color: white;
    text-decoration: none;
}

/* Powered by section */
.powered-by {
    margin-top: 16px;
    font-size: 12px;
    color: var(--bs-secondary-color);
    text-align: center;
    padding: 16px;
    background: var(--bs-body-bg);
    border-radius: 8px;
    flex-shrink: 0;
}

.powered-by a {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    text-decoration: underline;
}

/* Highlight Element */
.highlight {
    position: absolute;
    z-index: 10003;
    border: 4px solid var(--bs-primary);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 0 6px rgba(var(--bs-primary-rgb), 0.2),
        0 12px 30px rgba(var(--bs-primary-rgb), 0.4);
    animation: highlightPulse 2s infinite;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 
            0 0 0 6px rgba(var(--bs-primary-rgb), 0.2),
            0 12px 30px rgba(var(--bs-primary-rgb), 0.4);
    }
    50% {
        box-shadow: 
            0 0 0 10px rgba(var(--bs-primary-rgb), 0.3),
            0 16px 40px rgba(var(--bs-primary-rgb), 0.5);
    }
    100% {
        box-shadow: 
            0 0 0 6px rgba(var(--bs-primary-rgb), 0.2),
            0 12px 30px rgba(var(--bs-primary-rgb), 0.4);
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #tour-overlay {
        padding: 16px;
    }
    
    .tour-step {
        min-height: 250px;
        max-height: 90vh;
    }
    
    .tour-header {
        padding: 20px 24px 16px;
    }
    
    .tour-content {
        min-height: 80px;
        padding: 24px;
    }
    
    .tour-navigation {
        padding: 20px 24px;
        flex-direction: column;
        gap: 12px;
    }
    
    .tour-step .btn {
        width: 100%;
        justify-content: center;
    }
    
    .tour-step h2 {
        font-size: 20px;
    }
    
    .tour-step p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .tour-step {
        min-height: 200px;
        max-height: 95vh;
    }
    
    .tour-header {
        padding: 16px 20px 12px;
    }
    
    .tour-content {
        min-height: 60px;
        padding: 20px;
    }
    
    .tour-navigation {
        padding: 16px 20px;
    }
    
    .tour-logo {
        max-width: 100px;
    }
}

/* Dark mode support - now uses Bootstrap's dark theme variables */
[data-bs-theme=dark] .tour-step {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

[data-bs-theme=dark] .tour-content {
    background: var(--bs-secondary-bg);
}

[data-bs-theme=dark] .tour-step p {
    color: var(--bs-body-color);
}

[data-bs-theme=dark] .tour-step input[type="number"] {
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

[data-bs-theme=dark] .tour-navigation {
    background: var(--bs-body-bg);
    border-top-color: var(--bs-border-color);
}

[data-bs-theme=dark] .powered-by {
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
}

[data-bs-theme=dark] .tour-progress {
    background-color: var(--bs-border-color);
}


