/**
 * ============================================
 * CHIFFTOWN ACTIVITY FEED STYLES
 * ============================================
 * Real-time feed showing town activity
 * Deep blues, teal, gold - no pink/purple
 * ============================================
 */

/* ==========================================
   ACTIVITY FEED BUTTON
   ========================================== */

.activity-feed-btn {
    position: fixed;
    bottom: 170px;
    right: 20px;
    z-index: 9988;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 16px;
    
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(79, 195, 247, 0.1);
}

.activity-feed-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(79, 195, 247, 0.25);
}

.activity-feed-btn.active {
    border-color: #4fc3f7;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2) 0%, rgba(30, 41, 59, 0.95) 100%);
}

.feed-btn-icon {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.activity-feed-btn:hover .feed-btn-icon {
    transform: scale(1.15) rotate(-5deg);
}

.feed-btn-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feed-btn-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==========================================
   ACTIVITY FEED PANEL
   ========================================== */

.activity-feed-panel {
    position: fixed;
    bottom: 250px;
    right: 20px;
    z-index: 9989;
    
    width: 380px;
    max-height: 500px;
    
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(20, 30, 50, 0.98) 100%);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 20px;
    
    backdrop-filter: blur(20px);
    box-shadow: 
        0 10px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(79, 195, 247, 0.15);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.activity-feed-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ==========================================
   FEED HEADER
   ========================================== */

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(79, 195, 247, 0.15);
}

.feed-title {
    display: flex;
    align-items: center;
    gap: 10px;
    
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.feed-title-icon {
    font-size: 1.25rem;
}

.feed-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-filter-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feed-filter-btn:hover {
    background: rgba(79, 195, 247, 0.15);
    border-color: rgba(79, 195, 247, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.feed-filter-btn.active {
    background: rgba(79, 195, 247, 0.25);
    border-color: rgba(79, 195, 247, 0.5);
    color: #4fc3f7;
}

.feed-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-left: 8px;
    
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feed-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* ==========================================
   FEED CONTENT
   ========================================== */

.feed-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 195, 247, 0.3) transparent;
}

.feed-content::-webkit-scrollbar {
    width: 6px;
}

.feed-content::-webkit-scrollbar-track {
    background: transparent;
}

.feed-content::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.3);
    border-radius: 3px;
}

.feed-content::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 195, 247, 0.5);
}

/* Empty State */
.feed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.feed-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.feed-empty p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.feed-empty-hint {
    font-size: 0.85rem !important;
    font-style: italic;
    opacity: 0.5;
}

/* ==========================================
   ACTIVITY ITEM
   ========================================== */

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    
    transition: all 0.2s ease;
    animation: slideInActivity 0.3s ease-out forwards;
}

@keyframes slideInActivity {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-item:hover {
    background: rgba(79, 195, 247, 0.08);
    border-color: rgba(79, 195, 247, 0.2);
}

.activity-item.clickable {
    cursor: pointer;
}

.activity-item.clickable:hover {
    transform: translateX(4px);
}

.activity-item.subtle {
    opacity: 0.7;
    padding: 10px;
}

.activity-item.subtle:hover {
    opacity: 1;
}

/* Activity Icon */
.activity-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    border-radius: 10px;
    font-size: 1.1rem;
}

.activity-item.subtle .activity-icon {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
}

/* Activity Content */
.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-bottom: 4px;
}

.activity-message strong {
    color: #ffffff;
    font-weight: 600;
}

.activity-message em {
    color: #4fc3f7;
    font-style: normal;
}

.activity-time {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   FEED FOOTER
   ========================================== */

.feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(79, 195, 247, 0.1);
}

.feed-live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.feed-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .activity-feed-btn {
        bottom: 150px;
        right: 15px;
        padding: 10px 14px;
    }
    
    .feed-btn-icon {
        font-size: 1.25rem;
    }
    
    .feed-btn-label {
        font-size: 0.6rem;
    }
    
    .activity-feed-panel {
        bottom: 220px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 400px;
    }
    
    .feed-header {
        padding: 12px 14px;
    }
    
    .feed-title {
        font-size: 1rem;
    }
    
    .activity-item {
        padding: 10px;
    }
    
    .activity-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .activity-message {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .activity-feed-btn {
        bottom: 130px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .activity-feed-panel {
        bottom: 190px;
        max-height: 350px;
    }
    
    .feed-controls {
        gap: 4px;
    }
    
    .feed-filter-btn,
    .feed-close-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .activity-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .activity-message {
        font-size: 0.75rem;
    }
}

/* ==========================================
   HIDE ON HOMEPAGE
   ========================================== */

body.homepage .activity-feed-btn,
body.homepage .activity-feed-panel {
    display: none;
}

/* ==========================================
   PREFERS REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .activity-item,
    .activity-feed-panel,
    .feed-btn-badge,
    .live-dot {
        animation: none;
    }
    
    .activity-feed-panel {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .activity-feed-panel.active {
        transform: none;
    }
}
