/* ═══════════════════════════════════════════════════════════
   Live Box — باکس «همین حالا» — طراحی کامل
   رنگ‌بندی: نیلی #3548a0 + یاقوتی #c2185b + فیروزه‌ای #26a69a
   ═══════════════════════════════════════════════════════════ */

.mbs-live-box {
    --indigo: #3548a0;
    --indigo-lt: #5a6bc4;
    --indigo-dk: #253477;
    --ruby: #c2185b;
    --ruby-lt: #e91e63;
    --ruby-dk: #8e0e3e;
    --teal: #26a69a;
    --teal-lt: #4dd0c4;

    position: relative;
    background: #fff;
    border: 1px solid #e6eaf3;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(53,72,160,.04), 0 8px 24px rgba(53,72,160,.06);
}

.mbs-live-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--indigo), var(--ruby), var(--teal));
    z-index: 2;
}

/* ═══ Header ═══ */
.mbs-live-box__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e6eaf3;
    background: linear-gradient(180deg, #fafbfd, #fff);
}

.mbs-live-box__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mbs-live-box__pulse {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--ruby);
    border-radius: 50%;
    flex-shrink: 0;
}

.mbs-live-box__pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--ruby);
    opacity: .5;
    animation: lbPulse 1.6s ease-out infinite;
}

@keyframes lbPulse {
    0% { transform: scale(0.8); opacity: .7; }
    100% { transform: scale(2); opacity: 0; }
}

.mbs-live-box__title {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(90deg, var(--indigo), var(--ruby));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -.3px;
    line-height: 1;
}

.mbs-live-box__badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .8px;
    line-height: 1;
}

.mbs-live-box__badge--active {
    background: linear-gradient(135deg, var(--ruby), var(--ruby-dk));
    color: #fff;
    box-shadow: 0 2px 8px rgba(194,24,91,.35);
    animation: lbBadge 2s ease-in-out infinite;
}

@keyframes lbBadge {
    0%, 100% { box-shadow: 0 2px 8px rgba(194,24,91,.35); }
    50% { box-shadow: 0 2px 16px rgba(194,24,91,.6); }
}

.mbs-live-box__badge--offline {
    background: #f1f3f4;
    color: #94a3b8;
}

/* ═══ Event ═══ */
.mbs-live-box__event {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    margin: 14px 14px 8px;
    background: linear-gradient(135deg, #fdf3f7, #f0f4fd);
    border-right: 3px solid var(--ruby);
    border-radius: 12px;
    align-items: flex-start;
    flex-shrink: 0;
}

.mbs-live-box__event-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(194,24,91,.25), 0 0 0 2px rgba(38,166,154,.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbs-live-box__event-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mbs-live-box__event-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--indigo), var(--ruby));
    color: #fff;
}

.mbs-live-box__event-info {
    flex: 1;
    min-width: 0;
}

.mbs-live-box__event-title {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--indigo-dk);
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mbs-live-box__event-title:hover { color: var(--ruby); }

.mbs-live-box__event-summary {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══ Timeline ═══ */
.mbs-live-box__timeline {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
}

.mbs-live-box__timeline::-webkit-scrollbar { width: 4px; }
.mbs-live-box__timeline::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--indigo), var(--teal));
    border-radius: 4px;
}

.mbs-tl-wrap { position: relative; }

.mbs-tl-wrap::before {
    content: '';
    position: absolute;
    top: 22px;
    bottom: 22px;
    right: 24px;
    width: 2px;
    background: linear-gradient(180deg, rgba(194,24,91,.7), rgba(53,72,160,.5) 50%, rgba(38,166,154,.5));
    border-radius: 2px;
    z-index: 0;
}

.mbs-tl {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mbs-tl__row {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    padding: 12px 16px 12px 14px;
    align-items: start;
}

.mbs-tl__row + .mbs-tl__row {
    border-top: 1px dashed rgba(53,72,160,.08);
}

.mbs-tl__col-node {
    display: flex;
    justify-content: center;
    padding-top: 4px;
    z-index: 1;
}

.mbs-tl__node {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--indigo);
    box-shadow: 0 0 0 3px #fff, 0 1px 3px rgba(53,72,160,.2);
    transition: all .25s;
}

.mbs-tl__row.is-new .mbs-tl__node {
    background: var(--ruby);
    border-color: var(--ruby);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 4px rgba(194,24,91,.15), 0 2px 8px rgba(194,24,91,.4);
    animation: tlNode 1.8s ease-in-out infinite;
}

@keyframes tlNode {
    0%, 100% { box-shadow: 0 0 0 4px rgba(194,24,91,.15), 0 2px 8px rgba(194,24,91,.4); }
    50% { box-shadow: 0 0 0 10px rgba(194,24,91,.03), 0 2px 14px rgba(194,24,91,.6); }
}

.mbs-tl__row.is-pinned .mbs-tl__node {
    background: var(--teal);
    border-color: var(--teal);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(38,166,154,.45);
}

.mbs-tl__col-body { min-width: 0; }

.mbs-tl__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.mbs-tl__time {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--indigo);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    padding: 2px 7px;
    background: linear-gradient(135deg, rgba(53,72,160,.08), rgba(38,166,154,.06));
    border-radius: 6px;
    line-height: 1.4;
}

.mbs-tl__row.is-new .mbs-tl__time {
    background: linear-gradient(135deg, rgba(194,24,91,.12), rgba(194,24,91,.06));
    color: var(--ruby-dk);
    font-weight: 800;
}

.mbs-tl__chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.4;
}

.mbs-tl__chip--new {
    background: linear-gradient(135deg, var(--ruby), var(--ruby-lt));
    color: #fff;
    animation: tlChip 2s ease-in-out infinite;
}

@keyframes tlChip {
    0%, 100% { box-shadow: 0 1px 6px rgba(194,24,91,.4); }
    50% { box-shadow: 0 2px 12px rgba(194,24,91,.65); }
}

.mbs-tl__chip--pin {
    background: linear-gradient(135deg, var(--teal), var(--teal-lt));
    color: #fff;
}

.mbs-tl__title {
    font-size: 12.5px;
    color: #1a2332;
    line-height: 1.65;
    font-weight: 600;
    margin: 0;
    text-align: right;
}

.mbs-tl__row.is-new .mbs-tl__title {
    color: var(--ruby-dk);
    font-weight: 700;
}

.mbs-tl__desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.7;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══ Empty ═══ */
.mbs-live-box__empty {
    padding: 40px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

.mbs-live-box__empty svg {
    display: block;
    margin: 0 auto 10px;
    color: var(--indigo);
    opacity: .35;
}

/* ═══ Actions ═══ */
.mbs-live-box__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 18px 16px;
    border-top: 1px solid #e6eaf3;
    background: linear-gradient(0deg, #fafbfd, #fff);
    flex-shrink: 0;
}

.mbs-live-box__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .22s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    min-height: 46px;
    color: inherit;
    line-height: 1;
}

.mbs-live-box__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform .25s;
}

.mbs-live-box__btn:hover svg { transform: scale(1.15); }

.mbs-live-box__btn--ghost {
    background: linear-gradient(135deg, #f0f4fd, #e8f5f3);
    color: var(--indigo);
    border: 1px solid rgba(53,72,160,.12);
}

.mbs-live-box__btn--ghost:hover {
    background: linear-gradient(135deg, #e2eaf9, #d8f0eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(53,72,160,.18);
}

.mbs-live-box__btn--primary {
    background: linear-gradient(135deg, var(--indigo), var(--indigo-lt));
    color: #fff;
    box-shadow: 0 3px 10px rgba(53,72,160,.3);
}

.mbs-live-box__btn--primary:hover {
    background: linear-gradient(135deg, var(--indigo-dk), var(--indigo));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(53,72,160,.45);
}

.mbs-live-box__btn--accent {
    background: linear-gradient(135deg, var(--ruby), var(--ruby-lt));
    color: #fff;
    box-shadow: 0 3px 10px rgba(194,24,91,.35);
    grid-column: 1 / -1;
    min-height: 50px;
    font-size: 13px;
}

.mbs-live-box__btn--accent::before {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    transition: left .6s;
}

.mbs-live-box__btn--accent:hover {
    background: linear-gradient(135deg, var(--ruby-dk), var(--ruby));
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(194,24,91,.55);
}

.mbs-live-box__btn--accent:hover::before { left: 120%; }
.mbs-live-box__btn--accent:hover svg { transform: scale(1.2) rotate(90deg); }
.mbs-live-box__btn--accent svg { width: 20px; height: 20px; }

.mbs-live-box__btn:active { transform: translateY(0) scale(.98); }

/* ═══ Responsive ═══ */
@media (max-width: 480px) {
    .mbs-live-box { min-height: 460px; border-radius: 14px; }
    .mbs-live-box__header { padding: 14px 16px 12px; }
    .mbs-live-box__title { font-size: 15px; }
    .mbs-live-box__event { margin: 12px 12px 6px; padding: 12px 14px; }
    .mbs-live-box__event-avatar { width: 48px; height: 48px; }
    .mbs-live-box__event-title { font-size: 13px; }
    .mbs-tl-wrap::before { right: 20px; }
    .mbs-tl__row { grid-template-columns: 42px 1fr; padding: 10px 12px 10px 10px; }
    .mbs-tl__title { font-size: 12px; }
    .mbs-live-box__actions { padding: 12px 14px 14px; gap: 6px; }
}
