/* RSD Media Aggregator - Frontend Styles */

/* Feed Layout - Card */
.rsd-media-feed.rsd-layout-card {
    display: grid;
    grid-template-columns: repeat(var(--rsd-columns, 3), 1fr);
    gap: 20px;
}

/* Feed Layout - List */
.rsd-media-feed.rsd-layout-list .rsd-mention-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}
.rsd-media-feed.rsd-layout-list .rsd-mention-item:last-child {
    border-bottom: none;
}

/* Card Item */
.rsd-mention-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rsd-mention-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Thumbnail */
.rsd-mention-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #f3f4f6;
}
.rsd-mention-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rsd-placeholder-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
}
.rsd-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}
.rsd-mention-item:hover .rsd-play-badge {
    background: #ff0000;
}

/* Body */
.rsd-mention-body {
    padding: 16px;
}
.rsd-mention-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
}
.rsd-mention-title a {
    text-decoration: none;
    color: #1a202c;
}
.rsd-mention-title a:hover {
    color: #2563eb;
}

/* Meta */
.rsd-mention-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 8px;
}
.rsd-source-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.rsd-badge-google-news { background: #e8f0fe; color: #1a73e8; }
.rsd-badge-youtube { background: #fce8e6; color: #d93025; }
.rsd-badge-facebook { background: #e7f3ff; color: #1877f2; }
.rsd-badge-instagram { background: #fce4ec; color: #e4405f; }

.rsd-mention-date {
    color: #9ca3af;
}
.rsd-mention-excerpt {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* YouTube Gallery */
.rsd-youtube-gallery {
    display: grid;
    grid-template-columns: repeat(var(--rsd-columns, 3), 1fr);
    gap: 20px;
}
.rsd-yt-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.rsd-yt-player {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    cursor: pointer;
}
.rsd-yt-player img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rsd-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.85);
    color: #fff;
    border: none;
    width: 56px;
    height: 40px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rsd-yt-play:hover {
    background: #ff0000;
}
.rsd-yt-title {
    font-size: 14px;
    font-weight: 600;
    padding: 12px 14px 4px;
    margin: 0;
    line-height: 1.4;
}
.rsd-yt-date {
    display: block;
    padding: 0 14px 12px;
    font-size: 12px;
    color: #9ca3af;
}

/* News Ticker */
.rsd-news-ticker {
    display: flex;
    align-items: center;
    background: #1a365d;
    color: #fff;
    border-radius: 6px;
    overflow: hidden;
    font-size: 14px;
}
.rsd-ticker-label {
    background: #c53030;
    padding: 10px 16px;
    font-weight: 700;
    white-space: nowrap;
    font-size: 13px;
}
.rsd-ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.rsd-ticker-content {
    display: flex;
    white-space: nowrap;
    animation: rsd-ticker-scroll var(--ticker-speed, 30s) linear infinite;
    padding: 10px 0;
}
.rsd-ticker-content:hover {
    animation-play-state: paused;
}
.rsd-ticker-item {
    color: #fff;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}
.rsd-ticker-item:hover {
    color: #fbbf24;
}
.rsd-ticker-date {
    opacity: 0.6;
    font-size: 12px;
}
.rsd-ticker-sep {
    opacity: 0.3;
    margin: 0 8px;
}
@keyframes rsd-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Stats */
.rsd-media-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.rsd-media-stats.rsd-stats-block {
    flex-direction: column;
}
.rsd-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.rsd-stat-item .rsd-stat-icon {
    font-size: 20px;
}
.rsd-stat-item .rsd-stat-count {
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
}
.rsd-stat-item .rsd-stat-label {
    font-size: 13px;
    color: #64748b;
}
.rsd-stat-total {
    background: #f0f4ff;
    border-color: #bfdbfe;
}

/* No Results */
.rsd-no-results {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .rsd-media-feed.rsd-layout-card,
    .rsd-youtube-gallery {
        grid-template-columns: 1fr;
    }
    .rsd-media-feed.rsd-layout-list .rsd-mention-item {
        flex-direction: column;
    }
    .rsd-news-ticker {
        font-size: 13px;
    }
    .rsd-media-stats {
        flex-direction: column;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .rsd-media-feed.rsd-layout-card,
    .rsd-youtube-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
