/* Data Feed Command Center -- CSS animations */

/* Status dot pulse */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.pulse-animation {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Pipeline flow particle animation */
@keyframes flow-particle-right {
    0% {
        left: -12px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        left: calc(100% + 4px);
        opacity: 0;
    }
}
.flow-particle-right {
    animation: flow-particle-right 2.4s linear infinite;
}

/* Dark dropdown theming */
.feed-dropdown-dark .Select-control {
    background-color: #040e0e !important;
    border-color: #183031 !important;
    color: #def1f3 !important;
}
.feed-dropdown-dark .Select-menu-outer {
    background-color: #040e0e !important;
    border-color: #183031 !important;
}
.feed-dropdown-dark .Select-option {
    background-color: #040e0e !important;
    color: #90bfc4 !important;
}
.feed-dropdown-dark .Select-option.is-focused {
    background-color: #183031 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   Live Media Feed
   ═══════════════════════════════════════════════════════════════════ */

/* Media scroll container — manual scroll, smooth behavior */
.media-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    min-height: 250px;
    scroll-behavior: smooth;
}
.media-scroll-container::-webkit-scrollbar {
    height: 6px;
}
.media-scroll-container::-webkit-scrollbar-track {
    background: #040809;
    border-radius: 3px;
}
.media-scroll-container::-webkit-scrollbar-thumb {
    background: #183031;
    border-radius: 3px;
}
.media-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #192728;
}

/* Media scroll track — newest items on left */
.media-scroll-track {
    display: flex;
    gap: 14px;
    width: max-content;
}

/* Slide-in animation for new cards */
@keyframes media-slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Media card base (animation + layout merged to avoid transform conflict) */
.media-card {
    animation: media-slide-in 0.5s ease-out;
    width: 210px;
    min-width: 210px;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid #183031;
    background: #040e0e;
    transition: border-color 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.media-card:hover {
    border-color: #75aeb2;
    transform: translateY(-2px);
}

/* Media area (image or video) */
.media-card-media {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #040809;
}

/* Video play icon overlay */
.media-card-play {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    color: white;
    text-shadow: none;
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.media-card:hover .media-card-play {
    opacity: 1;
}

/* Info area below media */
.media-card-info {
    padding: 8px 10px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Source badge */
.media-badge-source {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Severity pill */
.media-badge-severity {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: 4px;
}

/* Severity colors */
.media-sev-critical { background: rgba(196,122,106,0.25); color: #c47a6a; }
.media-sev-high { background: rgba(196,136,106,0.25); color: #c4886a; }
.media-sev-medium { background: rgba(196,164,106,0.25); color: #c4a46a; }
.media-sev-low { background: rgba(103,149,163,0.25); color: #90bfc4; }

/* Source badge colors */
.media-src-twitter { background: rgba(117,174,178,0.2); color: #75aeb2; }
.media-src-telegram { background: rgba(111,168,184,0.2); color: #6fa8b8; }
.media-src-news { background: rgba(124,180,185,0.2); color: #7cb4b9; }
.media-src-tiktok { background: rgba(111,168,184,0.2); color: #6fa8b8; }

/* Headline text */
.media-card-headline {
    font-size: 11px;
    color: #9ec4c9;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 30px;
}

/* Age text */
.media-card-age {
    font-size: 9px;
    color: #6795a3;
}

/* ═══════════════════════════════════════════════════════════════════
   Lightbox Modal
   ═══════════════════════════════════════════════════════════════════ */

.media-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.media-lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    position: relative;
    cursor: default;
}
.media-lightbox-content img,
.media-lightbox-content video {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 8px;
    display: block;
}
.media-lightbox-caption {
    padding: 12px 0;
    max-width: 90vw;
}
.media-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    font-size: 28px;
    color: #90bfc4;
    cursor: pointer;
    z-index: 10001;
    background: none;
    border: none;
    transition: color 0.2s;
}
.media-lightbox-close:hover {
    color: #def1f3;
}

/* ═══════════════════════════════════════════════════════════════════
   Source Card Live Status
   ═══════════════════════════════════════════════════════════════════ */

/* Clickable card hover */
.feed-source-card > div {
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.feed-source-card:hover > div {
    border-color: #75aeb2 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(117, 174, 178, 0.15);
}

/* Healthy status — pulsing green glow */
@keyframes status-glow-green {
    0%, 100% {
        box-shadow: none;
        opacity: 1;
    }
    50% {
        box-shadow: none;
        opacity: 0.7;
    }
}
.feed-status-healthy {
    animation: status-glow-green 2s ease-in-out infinite;
}

/* Running status — fast cyan pulse */
@keyframes status-glow-cyan {
    0%, 100% {
        box-shadow: none;
        opacity: 1;
    }
    50% {
        box-shadow: none;
        opacity: 0.5;
    }
}
.feed-status-running {
    animation: status-glow-cyan 1s ease-in-out infinite;
}

/* Error status — steady red glow */
.feed-status-error {
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Source Detail Modal
   ═══════════════════════════════════════════════════════════════════ */

.feed-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.feed-detail-panel {
    position: relative;
    z-index: 1;
    background: #040e0e;
    border: 1px solid #183031;
    border-radius: 14px;
    padding: 28px 32px;
    min-width: 400px;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.feed-detail-close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 24px;
    color: #90bfc4;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
}
.feed-detail-close:hover {
    color: #def1f3;
    background-color: rgba(255, 255, 255, 0.08);
}
