/**
 * GoBook.ng - Conversion Optimization Styles
 * Urgency indicators, price insights, promotional banners
 */

/* ==================== URGENCY BADGES ==================== */

.urgency-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
    animation: pulseUrgency 2s ease-in-out infinite;
}

/* High urgency - Red/Orange */
.urgency-badge.urgency-high {
    background: linear-gradient(135deg, #FF385C, #E31C5F);
    color: #FFFFFF;
}

/* Medium urgency - Orange */
.urgency-badge.urgency-medium {
    background: linear-gradient(135deg, #FF9500, #FF6B00);
    color: #FFFFFF;
}

/* View pressure - Blue */
.urgency-badge.urgency-views {
    background: linear-gradient(135deg, #007AFF, #0051D5);
    color: #FFFFFF;
}

/* Limited availability - Purple */
.urgency-badge.urgency-limited {
    background: linear-gradient(135deg, #AF52DE, #8E44AD);
    color: #FFFFFF;
}

/* Popular/Wishlist - Pink */
.urgency-badge.urgency-popular {
    background: linear-gradient(135deg, #FF2D55, #C7134E);
    color: #FFFFFF;
}

.urgency-badge i {
    font-size: 11px;
}

@keyframes pulseUrgency {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* ==================== PRICE INSIGHTS ==================== */

.price-insight-wrapper {
    margin-top: 4px;
}

.price-insight {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Price below average - Green (good deal) */
.price-insight.price-below {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #FFFFFF;
}

/* Price above average - Blue (premium) */
.price-insight.price-above {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: #FFFFFF;
}

.price-insight i {
    font-size: 10px;
}

/* ==================== FIRST-TIME OFFER BANNER ==================== */

.first-time-offer {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #222222;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    animation: shimmerGold 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.first-time-offer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shimmerGold {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    }
}

@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

.first-time-offer i {
    margin-right: 6px;
    font-size: 14px;
}

/* Sticky first-time banner at top */
.first-time-banner-sticky {
    position: sticky;
    top: 73px;
    z-index: 150;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #222222;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.first-time-banner-sticky .close-banner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.1);
    border: none;
    color: #222222;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.first-time-banner-sticky .close-banner:hover {
    background: rgba(0,0,0,0.2);
}

/* ==================== PROPERTY CARD INTEGRATION ==================== */

/* Container for urgency + price on cards */
.conversion-indicators {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Compact mode for property cards */
.property-card .urgency-badge,
.property-card .price-insight {
    font-size: 10px;
    padding: 2px 6px;
}

.property-card .urgency-badge i,
.property-card .price-insight i {
    font-size: 9px;
}

/* ==================== COUNTDOWN TIMER ==================== */

.countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #FF385C, #E31C5F);
    color: #FFFFFF;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
}

.countdown-timer i {
    font-size: 10px;
}

.countdown-timer .time {
    font-variant-numeric: tabular-nums;
}

/* ==================== SOCIAL PROOF SECTION ==================== */

.social-proof-banner {
    background: #F7F7F7;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-proof-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF385C, #E31C5F);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.social-proof-text {
    flex: 1;
}

.social-proof-text strong {
    color: #222222;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.social-proof-text span {
    color: #717171;
    font-size: 12px;
}

/* ==================== SCARCITY INDICATORS ==================== */

.scarcity-alert {
    background: #FFF3CD;
    border: 1px solid #FFE69C;
    border-left: 4px solid #FFC107;
    color: #856404;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scarcity-alert i {
    color: #FFC107;
    font-size: 14px;
}

/* ==================== TRENDING BADGE ==================== */

.trending-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #FF385C, #E31C5F);
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(255, 56, 92, 0.4);
    z-index: 15;
    animation: trending 2s ease-in-out infinite;
}

@keyframes trending {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.trending-badge i {
    font-size: 11px;
    animation: trendingIcon 1s ease-in-out infinite;
}

@keyframes trendingIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */

@media (max-width: 768px) {
    .first-time-banner-sticky {
        top: 60px;
        padding: 10px 40px 10px 16px;
        font-size: 13px;
    }
    
    .first-time-offer {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .social-proof-banner {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .social-proof-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .social-proof-text strong {
        font-size: 13px;
    }
    
    .social-proof-text span {
        font-size: 11px;
    }
    
    .scarcity-alert {
        font-size: 11px;
        padding: 8px 10px;
    }
}

/* ==================== PROPERTY DETAILS PAGE ==================== */

.conversion-section {
    margin: 20px 0;
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.conversion-stat {
    background: #F7F7F7;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.conversion-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #FF385C;
    margin-bottom: 4px;
}

.conversion-stat-label {
    font-size: 12px;
    color: #717171;
    font-weight: 600;
}

/* ==================== DISCOUNT BADGE ==================== */

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #222222;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    z-index: 15;
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: discountShine 2s ease-in-out infinite;
}

@keyframes discountShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}