/* ===================================
   PSYCHOLOGICAL TRIGGERS BAR
   =================================== */

#sticky-triggers-bar {
    position: fixed;
    top: 110px; /* Below header + announcement */
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark-grey) 0%, #1f1f1f 100%);
    color: white;
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 1px solid rgba(217, 180, 95, 0.2);
}

#sticky-triggers-bar.active {
    opacity: 1;
    transform: translateY(0);
}

/* When scrolled, move up to account for hidden announcement bar */
body.scrolled #sticky-triggers-bar {
    top: 75px;
}

.triggers-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.trigger-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(217, 180, 95, 0.2);
    transition: all 0.3s ease;
}

.trigger-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(217, 180, 95, 0.4);
    transform: translateY(-2px);
}

.trigger-item svg {
    color: var(--primary-gold);
    flex-shrink: 0;
}

.trigger-item strong {
    color: var(--primary-gold);
    font-weight: 700;
}

/* Urgency animation */
.trigger-item.urgency strong {
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        color: var(--primary-gold);
    }
    50% {
        color: var(--primary-light-gold);
    }
}

/* ===================================
   SOCIAL PROOF POPUP
   =================================== */

.social-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    max-width: 350px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    z-index: 998;
    border: 1px solid rgba(217, 180, 95, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: slideInLeft 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.social-popup.hidden {
    opacity: 0;
    transform: translateX(-120%);
    pointer-events: none;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-120%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.popup-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.popup-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popup-icon svg {
    color: #4CAF50;
}

.popup-text {
    flex: 1;
}

.popup-message {
    font-size: 0.92rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
}

.popup-time {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

/* Progress bar animation */
.social-popup::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold) 0%, transparent 100%);
    animation: progressBar 5s linear;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 768px) {
    #sticky-triggers-bar {
        top: 95px;
    }
    
    body.scrolled #sticky-triggers-bar {
        top: 60px;
    }
    
    .triggers-content {
        gap: var(--spacing-sm);
        font-size: 0.85rem;
    }
    
    .trigger-item {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
    
    .social-popup {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .triggers-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .trigger-item {
        width: 100%;
        justify-content: center;
    }
    
    .social-popup {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 14px 16px;
    }
    
    .popup-content {
        gap: 12px;
    }
    
    .popup-icon {
        width: 36px;
        height: 36px;
    }
    
    .popup-message {
        font-size: 0.88rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    #sticky-triggers-bar,
    .social-popup,
    .trigger-item.urgency strong {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    
    .social-popup::before {
        animation: none !important;
    }
}

/* Focus states */
.popup-close:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}
