/* ═══════════════════════════════════════════════════════════════
   Blockchain Box — باکس خبر لحظه‌به‌لحظه
   ═══════════════════════════════════════════════════════════════ */

.mbs-bc-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08),
                0 2px 6px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.mbs-bc-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b);
    opacity: 0.9;
}

/* ─── هدر ─── */
.mbs-bc-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

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

.mbs-bc-box__pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    position: relative;
}

.mbs-bc-box__pulse.is-live {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: mbs-bc-pulse 1.5s infinite;
}

@keyframes mbs-bc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mbs-bc-box__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.mbs-bc-box__badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.mbs-bc-box__badge--live {
    background: #fee2e2;
    color: #991b1b;
}

.mbs-bc-box__badge--offline {
    background: #f1f5f9;
    color: #64748b;
}

/* ─── کارت خبر فعال ─── */
.mbs-bc-box__event {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.mbs-bc-box__event-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0f172a;
}

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

.mbs-bc-box__event-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}

.mbs-bc-box__event-cat {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(59, 130, 246, 0.95);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.mbs-bc-box__event-content {
    padding: 12px 14px 14px;
}

.mbs-bc-box__event-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    color: #0f172a;
}

.mbs-bc-box__event-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.mbs-bc-box__event-title a:hover {
    color: #3b82f6;
}

.mbs-bc-box__event-lead {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: #64748b;
}

/* ─── تایم‌لاین ─── */
.mbs-bc-box__timeline {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #f1f5f9;
    flex: 1;
    overflow: hidden;
}

.mbs-bc-box__timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #cbd5e1;
}

.mbs-bc-box__timeline-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mbs-bc-box__timeline-count {
    font-size: 11px;
    color: #94a3b8;
}

.mbs-bc-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
}

.mbs-bc-timeline::-webkit-scrollbar {
    width: 4px;
}

.mbs-bc-timeline::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.mbs-bc-timeline__item {
    position: relative;
    padding-right: 22px;
    padding-bottom: 14px;
}

.mbs-bc-timeline__item:last-child {
    padding-bottom: 0;
}

.mbs-bc-timeline__item::before {
    content: '';
    position: absolute;
    right: 5px;
    top: 12px;
    bottom: -4px;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6 0%, #e2e8f0 100%);
    border-radius: 1px;
}

.mbs-bc-timeline__item:last-child::before {
    display: none;
}

.mbs-bc-timeline__dot {
    position: absolute;
    right: 0;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #3b82f6;
    z-index: 1;
    box-shadow: 0 0 0 3px #eff6ff;
}

.mbs-bc-timeline__item.is-new .mbs-bc-timeline__dot {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px #fee2e2;
    animation: mbs-bc-pulse 1.5s infinite;
}

.mbs-bc-timeline__item.is-pinned .mbs-bc-timeline__dot {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px #fef3c7;
}

.mbs-bc-timeline__body {
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.mbs-bc-timeline__item:hover .mbs-bc-timeline__body {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.mbs-bc-timeline__item.is-pinned .mbs-bc-timeline__body {
    background: #fffbeb;
    border-color: #fbbf24;
}

.mbs-bc-timeline__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.mbs-bc-timeline__time {
    font-size: 11px;
    font-weight: 700;
    color: #3b82f6;
    font-variant-numeric: tabular-nums;
}

.mbs-bc-timeline__chip {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.mbs-bc-timeline__chip--new {
    background: #fee2e2;
    color: #991b1b;
}

.mbs-bc-timeline__chip--pin {
    background: #fef3c7;
    color: #92400e;
}

.mbs-bc-timeline__title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: #0f172a;
    margin-bottom: 3px;
}

.mbs-bc-timeline__text {
    font-size: 11px;
    color: #64748b;
    line-height: 1.6;
}

/* ─── خالی ─── */
.mbs-bc-box__empty {
    text-align: center;
    padding: 24px 16px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
}

.mbs-bc-box__empty p {
    margin: 8px 0 0;
    font-size: 12px;
}

/* ─── ۳ دکمه SVG ─── */
.mbs-bc-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.mbs-bc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    position: relative;
}

.mbs-bc-btn:hover {
    transform: translateY(-3px);
}

.mbs-bc-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.mbs-bc-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.mbs-bc-btn:hover .mbs-bc-btn__icon {
    transform: scale(1.1) rotate(-3deg);
}

.mbs-bc-btn__icon svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.mbs-bc-btn__label {
    font-size: 10.5px;
    font-weight: 700;
    color: #334155;
    text-align: center;
    line-height: 1.3;
}

.mbs-bc-btn--add .mbs-bc-btn__label {
    color: #92400e;
}

/* ─── حالت غیرفعال ─── */
/* ─── ریسپانسیو ─── */
@media (max-width: 768px) {
    .mbs-bc-box {
        padding: 14px;
        border-radius: 16px;
    }
    
    .mbs-bc-timeline {
        max-height: 240px;
    }
    
    .mbs-bc-actions {
        gap: 6px;
    }
    
    .mbs-bc-btn {
        padding: 8px 2px;
    }
    
    .mbs-bc-btn__icon svg {
        width: 34px;
        height: 34px;
    }
    
    .mbs-bc-btn__label {
        font-size: 9.5px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   حالت غیرفعال بلاک‌چین — طراحی آبی ملایم با پالس
   ═══════════════════════════════════════════════════════════════ */

.mbs-bc-offline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 20px 28px;
    background: linear-gradient(180deg, #f0f7ff 0%, #e8f2ff 100%);
    border-radius: 14px;
    margin: 8px 0;
    position: relative;
    overflow: hidden;
}

.mbs-bc-offline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(59,130,246,.08) 0%, transparent 60%);
    pointer-events: none;
}

/* ─── آیکن آنتن با حلقه‌های پالس ─── */
.mbs-bc-offline__signal {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.mbs-bc-offline__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, .4);
    animation: bcSignalPulse 2.4s ease-out infinite;
    pointer-events: none;
}
.mbs-bc-offline__ring--2 { animation-delay: .8s; }
.mbs-bc-offline__ring--3 { animation-delay: 1.6s; }

@keyframes bcSignalPulse {
    0% {
        transform: scale(.4);
        opacity: 0;
    }
    20% {
        opacity: .7;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.mbs-bc-offline__antenna {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 3px 8px rgba(59,130,246,.35));
    animation: bcAntFloat 3s ease-in-out infinite;
}

@keyframes bcAntFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* ─── متن‌ها ─── */
.mbs-bc-offline__title {
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 8px;
    line-height: 1.5;
    letter-spacing: -.2px;
}

.mbs-bc-offline__text {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.9;
    margin: 0 0 16px;
}

/* ─── سه دات پالس ─── */
.mbs-bc-offline__dots {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}
.mbs-bc-offline__dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    opacity: .4;
    animation: bcDotPulse 1.4s ease-in-out infinite;
}
.mbs-bc-offline__dots span:nth-child(2) { animation-delay: .2s; }
.mbs-bc-offline__dots span:nth-child(3) { animation-delay: .4s; }

@keyframes bcDotPulse {
    0%, 100% { opacity: .3; transform: scale(1); }
    50%      { opacity: 1;  transform: scale(1.3); }
}

/* ─── دکمه آرشیو ─── */
.mbs-bc-offline__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(59,130,246,.35), 0 0 0 0 rgba(59,130,246,.4);
    transition: transform .2s, box-shadow .2s;
    animation: bcBtnGlow 2.4s ease-in-out infinite;
}

@keyframes bcBtnGlow {
    0%, 100% { box-shadow: 0 4px 12px rgba(59,130,246,.35), 0 0 0 0 rgba(59,130,246,.4); }
    50%      { box-shadow: 0 6px 18px rgba(59,130,246,.5), 0 0 0 6px rgba(59,130,246,.1); }
}

.mbs-bc-offline__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(59,130,246,.5);
    color: #fff !important;
}
.mbs-bc-offline__btn:active {
    transform: translateY(0);
}
.mbs-bc-offline__btn svg {
    flex-shrink: 0;
}

/* ─── dark mode (اگه لازم شد) ─── */
@media (prefers-color-scheme: dark) {
    .mbs-bc-offline {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }
    .mbs-bc-offline__title { color: #93c5fd; }
    .mbs-bc-offline__text { color: #94a3b8; }
}
