/* Guided Tour Overlay System */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-overlay.active {
    display: block;
    opacity: 1;
}

.tour-spotlight {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    transition: all 0.3s ease;
    pointer-events: none;
}

.tour-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 380px;
    min-width: 300px;
    z-index: 10001;
    animation: tooltipSlideIn 0.3s ease-out;
}

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

.tour-tooltip-header {
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 16px;
}

.tour-tooltip-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a73e8;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-tooltip-step {
    font-size: 12px;
    color: #5f6368;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tour-tooltip-content {
    padding: 0 20px 20px 20px;
}

.tour-tooltip-description {
    color: #202124;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.tour-tooltip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-tooltip-nav {
    display: flex;
    gap: 8px;
}

.tour-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-btn-primary {
    background: #1a73e8;
    color: white;
}

.tour-btn-primary:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

.tour-btn-secondary {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.tour-btn-secondary:hover {
    background: #e8eaed;
}

.tour-btn-skip {
    background: none;
    color: #5f6368;
    text-decoration: underline;
    padding: 8px 0;
}

.tour-btn-skip:hover {
    color: #202124;
}

.tour-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #5f6368;
}

.tour-progress-bar {
    width: 100px;
    height: 4px;
    background: #e8eaed;
    border-radius: 2px;
    overflow: hidden;
}

.tour-progress-fill {
    height: 100%;
    background: #1a73e8;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Tour Start Button */
.tour-start-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.tour-start-btn i {
    font-size: 18px;
}

/* Pulse animation for tour start button */
.tour-start-btn.pulse {
    animation: tourPulse 2s infinite;
}

@keyframes tourPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3), 0 0 0 0 rgba(26, 115, 232, 0.7);
    }
    50% {
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3), 0 0 0 10px rgba(26, 115, 232, 0);
    }
}

/* Tooltip positioning */
.tour-tooltip.top {
    transform: translateY(-100%);
    margin-top: -16px;
}

.tour-tooltip.bottom {
    margin-top: 16px;
}

.tour-tooltip.left {
    transform: translateX(-100%);
    margin-left: -16px;
}

.tour-tooltip.right {
    margin-left: 16px;
}

/* Arrow indicators */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.tour-tooltip.top::before {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: white;
}

.tour-tooltip.bottom::before {
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: white;
}

.tour-tooltip.left::before {
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: white;
}

.tour-tooltip.right::before {
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: white;
}

/* Feature highlights */
.tour-highlight {
    position: relative;
}

.tour-highlight::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #1a73e8;
    border-radius: 8px;
    pointer-events: none;
    animation: tourHighlight 1.5s ease-in-out infinite;
}

@keyframes tourHighlight {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Welcome modal */
.tour-welcome-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    z-index: 10002;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.tour-welcome-header {
    text-align: center;
    padding: 32px 32px 0 32px;
}

.tour-welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    color: white;
    font-size: 28px;
}

.tour-welcome-title {
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
}

.tour-welcome-subtitle {
    color: #5f6368;
    font-size: 14px;
    margin-bottom: 24px;
}

.tour-welcome-content {
    padding: 0 32px 32px 32px;
}

.tour-welcome-description {
    color: #202124;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tour-welcome-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tour-tooltip {
        max-width: 280px;
        min-width: 260px;
    }
    
    .tour-welcome-modal {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .tour-start-btn {
        bottom: 80px; /* Above footer */
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
}