/* ═══════════════════════════════════════════════════════════════
 * Live News — Frontend
 * ═══════════════════════════════════════════════════════════════ */

.mbs-live,
.mbs-live-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    direction: rtl;
    font-family: Vazirmatn, Tahoma, sans-serif;
}

/* ═══ Header ═══ */
.mbs-live__header {
    margin-bottom: 24px;
    padding: 20px 0;
}

.mbs-live__header-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mbs-live__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
}

.mbs-live__badge--active {
    background: #d93025;
    color: #fff;
    animation: livePulse 2s infinite;
}

.mbs-live__badge--archive {
    background: #e0e0e0;
    color: #5f6368;
}

.mbs-live__badge-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: badgeDot 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217,48,37,0.6); }
    50% { box-shadow: 0 0 0 8px rgba(217,48,37,0); }
}

@keyframes badgeDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.mbs-live__cat {
    display: inline-flex;
    padding: 5px 12px;
    background: #e8f0fb;
    color: #1a5fb4;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all .15s;
}

.mbs-live__cat:hover {
    background: #1a5fb4;
    color: #fff;
}

.mbs-live__title {
    font-size: 32px;
    font-weight: 800;
    color: #202124;
    margin: 0 0 16px;
    line-height: 1.4;
}

.mbs-live__lead {
    font-size: 17px;
    color: #5f6368;
    line-height: 1.8;
    margin: 0 0 20px;
    max-width: 800px;
}

.mbs-live__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: #5f6368;
    padding-top: 16px;
    border-top: 1px solid #e0e5eb;
}

.mbs-live__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mbs-live__meta-item svg {
    color: #1a5fb4;
    flex-shrink: 0;
}

.mbs-live__hero {
    margin: 0 0 32px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.mbs-live__hero img {
    width: 100%;
    height: auto;
    display: block;
}

.mbs-live__intro {
    font-size: 16px;
    line-height: 1.9;
    color: #3c4043;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-radius: 14px;
    border-right: 4px solid #1a5fb4;
}

/* ═══ Section Title ═══ */
.mbs-live__section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e5eb;
}

.mbs-live__section-title svg {
    color: #1a5fb4;
    flex-shrink: 0;
}

.mbs-live__section-title h2 {
    font-size: 20px;
    font-weight: 800;
    color: #202124;
    margin: 0;
    flex: 1;
}

.mbs-live__count-badge {
    display: inline-flex;
    padding: 3px 10px;
    background: #1a5fb4;
    color: #fff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
}

/* ═══ Grid ═══ */
.mbs-live__grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    margin-bottom: 40px;
}

.mbs-live__main { min-width: 0; }

.mbs-live__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ═══ Polling ═══ */
.mbs-live__polling {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #e8f0fb;
    border: 1px solid #1a5fb4;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1a5fb4;
}

.mbs-live__polling-dot {
    width: 8px;
    height: 8px;
    background: #1a5fb4;
    border-radius: 50%;
    animation: badgeDot 1s infinite;
}

/* ═══ Timeline ═══ */
.live-timeline {
    position: relative;
    padding-right: 40px;
}

.timeline-line {
    position: absolute;
    top: 0;
    right: 15px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #1a5fb4 0%, #dadce0 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
    scroll-margin-top: 100px;
}

.timeline-item.new-update {
    animation: newUpdateHighlight 3s ease-out;
}

@keyframes newUpdateHighlight {
    0% { background: rgba(26,115,232,0.15); }
    100% { background: transparent; }
}

.timeline-item.pinned .timeline-content {
    border-right: 4px solid #f57f17;
    background: #fff8e1;
}

.timeline-marker {
    position: absolute;
    right: -33px;
    top: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background: #1a5fb4;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #1a5fb4, 0 2px 8px rgba(26,115,232,0.4);
}

.timeline-item.pinned .timeline-dot {
    background: #f57f17;
    box-shadow: 0 0 0 2px #f57f17, 0 2px 8px rgba(245,127,23,0.4);
}

.timeline-content {
    background: #fff;
    border: 1px solid #e0e5eb;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all .2s;
}

.timeline-content:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.timeline-time {
    display: inline-flex;
    flex-direction: column;
    font-size: 15px;
    font-weight: 800;
    color: #1a5fb4;
    margin-bottom: 10px;
}

.timeline-date {
    font-size: 11px;
    color: #9aa0a6;
    font-weight: 400;
    margin-top: 2px;
}

.timeline-pin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 18px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 10px;
    line-height: 1.5;
}

.timeline-summary {
    font-size: 15px;
    color: #3c4043;
    line-height: 1.8;
    margin: 0 0 12px;
}

.timeline-body {
    font-size: 15px;
    color: #3c4043;
    line-height: 1.8;
    margin-bottom: 12px;
}

.timeline-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

/* ═══ Attachments ═══ */
.timeline-attachments {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.att-image {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.att-image img {
    width: 100%;
    height: auto;
    display: block;
}

.att-image figcaption {
    padding: 10px 14px;
    font-size: 12px;
    color: #5f6368;
    background: #f8f9fa;
    border-top: 1px solid #e0e5eb;
}

.att-video video {
    width: 100%;
    border-radius: 12px;
    background: #000;
}

.att-caption {
    padding: 6px 0;
    font-size: 12px;
    color: #5f6368;
}

.att-audio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f1f3f4;
    border-radius: 12px;
}

.att-audio audio {
    flex: 1;
    height: 40px;
}

.att-audio svg { color: #6a1b9a; flex-shrink: 0; }

.att-article {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: #e8f0fe;
    border: 1.5px solid #1a5fb4;
    border-radius: 12px;
    color: #1a5fb4;
    text-decoration: none;
    transition: all .2s;
}

.att-article:hover {
    background: #1a5fb4;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26,115,232,0.3);
}

.att-article svg { flex-shrink: 0; }

.att-article-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
}

.att-article-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2px;
}

/* ═══ Empty State ═══ */
.timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 24px;
    background: #f8f9fa;
    border-radius: 14px;
    color: #9aa0a6;
    text-align: center;
}

.timeline-empty p { margin: 0; font-size: 14px; }

/* ═══ Sidebar ═══ */
.mbs-sidebar-card {
    background: #fff;
    border: 1px solid #e0e5eb;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.mbs-sidebar-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #202124;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e5eb;
}

.mbs-sidebar-card__title svg { color: #1a5fb4; flex-shrink: 0; }

.mbs-sidebar-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mbs-sidebar-timeline__item {
    padding-right: 12px;
    border-right: 2px solid #e8f0fb;
    transition: all .15s;
}

.mbs-sidebar-timeline__item:hover {
    border-right-color: #1a5fb4;
}

.mbs-sidebar-timeline__time {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #1a5fb4;
    margin-bottom: 4px;
}

.mbs-sidebar-timeline__title {
    font-size: 13px;
    color: #202124;
    text-decoration: none;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mbs-sidebar-timeline__title:hover { color: #1a5fb4; }

.mbs-sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mbs-tag-chip {
    display: inline-flex;
    padding: 4px 10px;
    background: #f1f3f4;
    color: #5f6368;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}

.mbs-tag-chip:hover {
    background: #1a5fb4;
    color: #fff;
}

.mbs-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mbs-sidebar-list__item {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 10px;
}

.mbs-sidebar-list__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mbs-sidebar-list__link {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.mbs-sidebar-list__img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.mbs-sidebar-list__body { flex: 1; min-width: 0; }

.mbs-sidebar-list__badge {
    display: inline-block;
    padding: 2px 8px;
    background: #d93025;
    color: #fff;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mbs-sidebar-list__title {
    font-size: 13px;
    font-weight: 600;
    color: #202124;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══ Archive Section (در صفحه جزئیات) ═══ */
.mbs-live__archive {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 2px solid #e0e5eb;
}

.mbs-live__archive-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #202124;
    margin: 0 0 24px;
}

.mbs-live__archive-title svg { color: #1a5fb4; }

.mbs-live__archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.mbs-live__archive-more {
    text-align: center;
    margin-top: 24px;
}

/* ═══ Live Card ═══ */
.mbs-live-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e5eb;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}

.mbs-live-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.mbs-live-card.is-live { border-color: #d93025; }

.mbs-live-card__media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbs-live-card__media--placeholder svg {
    color: #1a5fb4;
    opacity: 0.3;
}

.mbs-live-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.mbs-live-card:hover .mbs-live-card__media img {
    transform: scale(1.05);
}

.mbs-live-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: #d93025;
    color: #fff;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    animation: livePulse 2s infinite;
}

.mbs-live-card__body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mbs-live-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #202124;
    margin: 0 0 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mbs-live-card__lead {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mbs-live-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
    font-size: 12px;
    color: #9aa0a6;
}

.mbs-live-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mbs-live-card__meta-item svg { color: #9aa0a6; }

/* ═══ Archive Page ═══ */
.mbs-live-archive__header {
    text-align: center;
    margin-bottom: 40px;
    padding: 32px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f0fb 100%);
    border-radius: 20px;
}

.mbs-live-archive__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1a5fb4, #15488a);
    color: #fff;
    border-radius: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(26,95,180,0.3);
}

.mbs-live-archive__title {
    font-size: 28px;
    font-weight: 800;
    color: #202124;
    margin: 0 0 8px;
}

.mbs-live-archive__subtitle {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

.mbs-live-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.mbs-live-archive__empty {
    text-align: center;
    padding: 80px 24px;
    color: #9aa0a6;
}

.mbs-live-archive__empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.mbs-live-archive__empty p {
    font-size: 15px;
    margin: 0;
}

/* ═══ Buttons ═══ */
.mbs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
    border: none;
}

.mbs-btn--outline {
    background: transparent;
    color: #1a5fb4;
    border: 1.5px solid #1a5fb4;
}

.mbs-btn--outline:hover {
    background: #1a5fb4;
    color: #fff;
}

/* ═══ Responsive ═══ */
@media (max-width: 992px) {
    .mbs-live__grid { grid-template-columns: 1fr; gap: 24px; }
    .mbs-live__sidebar { order: 2; }
    .mbs-live__main { order: 1; }
}

@media (max-width: 768px) {
    .mbs-live, .mbs-live-archive { padding: 12px 12px 40px; }
    .mbs-live__title { font-size: 24px; }
    .mbs-live__lead { font-size: 15px; }
    .mbs-live__intro { padding: 16px 18px; font-size: 15px; }
    .live-timeline { padding-right: 32px; }
    .timeline-line { right: 11px; }
    .timeline-marker { right: -28px; }
    .timeline-content { padding: 14px 16px; }
    .timeline-title { font-size: 16px; }
    .timeline-summary, .timeline-body { font-size: 14px; }
    .mbs-live-archive__grid { grid-template-columns: 1fr; }
    .mbs-live__archive-grid { grid-template-columns: 1fr; }
    .mbs-live-archive__title { font-size: 22px; }
}
