/**
 * Tripwire Guidance System
 * Helps new visitors discover interactive tripwire elements
 */

/* ============================================
   ENHANCED PULSE ANIMATION (first 5 seconds)
   ============================================ */

.tripwire-highlight .trip-wire-phrase {
    animation: tripwire-attention 1.5s ease-in-out 3;
}

.tripwire-highlight .trip-wire-phrase::after {
    animation: tripwire-sparkle 0.8s ease-in-out infinite;
}

@keyframes tripwire-attention {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: linear-gradient(
            180deg,
            transparent 60%,
            rgba(201, 204, 104, 0.4) 60%
        );
    }
}

@keyframes tripwire-sparkle {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
        color: #B8A52B;
    }
}

/* ============================================
   COACH MARK OVERLAY
   ============================================ */

.tripwire-coach-mark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tripwire-coach-mark.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Dark overlay with cutout */
.tripwire-coach-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

/* Spotlight cutout around tripwire */
.tripwire-spotlight {
    position: absolute;
    border-radius: 4px;
    box-shadow:
        0 0 0 4px rgba(201, 204, 104, 0.8),
        0 0 0 9999px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    animation: spotlight-pulse 2s ease-in-out infinite;
}

@keyframes spotlight-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(201, 204, 104, 0.8),
            0 0 0 9999px rgba(0, 0, 0, 0.7);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(201, 204, 104, 0.6),
            0 0 0 9999px rgba(0, 0, 0, 0.7);
    }
}

/* Tooltip */
.tripwire-coach-tooltip {
    position: absolute;
    background: #F5F5F0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    max-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    animation: tooltip-float 3s ease-in-out infinite;
}

@keyframes tooltip-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Arrow pointing to tripwire */
.tripwire-coach-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.tripwire-coach-tooltip.arrow-top::before {
    bottom: 100%;
    left: 30px;
    border-bottom-color: #F5F5F0;
}

.tripwire-coach-tooltip.arrow-bottom::before {
    top: 100%;
    left: 30px;
    border-top-color: #F5F5F0;
}

.tripwire-coach-tooltip.arrow-left::before {
    right: 100%;
    top: 20px;
    border-right-color: #F5F5F0;
}

.tripwire-coach-title {
    font-family: 'Stardos Stencil', serif;
    font-size: 1.1rem;
    color: #4A3728;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tripwire-coach-title .sparkle {
    color: #C9CC68;
}

.tripwire-coach-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #5A4339;
    margin: 0 0 1rem 0;
}

.tripwire-coach-dismiss {
    display: inline-block;
    background: #C9CC68;
    color: #4A3728;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tripwire-coach-dismiss:hover {
    background: #d4d977;
    transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .tripwire-coach-tooltip {
        max-width: 260px;
        padding: 1rem 1.25rem;
        left: 50% !important;
        transform: translateX(-50%);
    }

    .tripwire-coach-tooltip.arrow-top::before,
    .tripwire-coach-tooltip.arrow-bottom::before {
        left: 50%;
        transform: translateX(-50%);
    }
}
