/* Tour / Walkthrough Styles */

/* Overlay Backdrop */
.tour-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allows clicking through initially, toggled via JS */
}

.tour-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Highlighted Element */
.tour-highlight {
    position: relative;
    z-index: 9001 !important;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.6), 0 0 20px rgba(0,0,0,0.5);
    background-color: var(--dark-bg, #0f0f23); /* Ensure bg isn't transparent */
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Tooltip Bubble */
.tour-tooltip {
    position: absolute;
    width: 320px;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 9002;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: white;
}

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

/* Arrow/Caret */
.tour-tooltip::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: inherit;
    border-top: 1px solid rgba(79, 172, 254, 0.3);
    border-left: 1px solid rgba(79, 172, 254, 0.3);
    transform: rotate(45deg);
    /* Positioning managed via JS classes or inline */
}

.tour-tooltip.top::after {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(225deg);
}

.tour-tooltip.bottom::after {
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.tour-tooltip.left::after {
    right: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(135deg);
}

.tour-tooltip.right::after {
    left: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Content */
.tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tour-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4facfe;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-step-counter {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.tour-body {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
}

/* Footer Controls */
.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-skip {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.tour-skip:hover {
    color: white;
}

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

.tour-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tour-btn-prev {
    background: rgba(255,255,255,0.1);
    color: white;
}

.tour-btn-prev:hover {
    background: rgba(255,255,255,0.2);
}

.tour-btn-next {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.tour-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.5);
}

/* Pulse Animation for Strong Points */
@keyframes tourPulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(79, 172, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0); }
}

.tour-highlight-pulse {
    animation: tourPulse 2s infinite;
}
