/* ======================================================================
   WP Live Advanced Blog – style.css (v1.2)
   پشتیبانی از دو تم، Lazy-load، Sticky header، رنگ نوار پین متغیّر
   ====================================================================== */

/* ───────── تم‌ها و متغیرهای رنگ ───────── */
:root{
    --bg:#212c36;
    --bg-card:#283646;
    --text:#fff;
    --text-dim:rgba(255,255,255,.7);
    --border-card:#222d3b;
    --label-red:#e74040;
    --label-blue:#56cfff;
    --pinned:#39b54a;          /* از PHP با inline-style بازنویسی می‌شود */
    --shadow:rgba(0,0,0,.15);
}
.wlab-theme-light{
    --bg:#f7f8fa;
    --bg-card:#fff;
    --text:#111;
    --text-dim:#555;
    --border-card:#d9dce0;
    --label-red:#c71616;
    --label-blue:#1689e4;
    --pinned:#0f9630;
    --shadow:rgba(0,0,0,.08);
}

/* ───────── کانتینر و هِدر ───────── */
.wlab-liveblog-container{
    background:var(--bg);
    color:var(--text);
    border-radius:22px;
    box-shadow:0 8px 32px var(--shadow);
    padding:30px 18px 38px;
    max-width:850px;
    margin:40px auto 48px;
    font-family:inherit;
}
.wlab-liveblog-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
    font-size:1.3rem;
}
.wlab-sticky{
    position:sticky;
    top:0;
    padding-top:6px;
    background:var(--bg);
    z-index:30;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}
.wlab-liveblog-title{font-weight:700;font-size:1.5rem}
.wlab-liveblog-update{font-size:1rem;opacity:.7}

/* نشان LIVE */
.wlab-live-indicator{
    display:none;
    align-items:center;
    font-size:1rem;
    font-weight:700;
    color:var(--label-red);
    margin-inline-start:8px;
}
.wlab-live-indicator::before{
    content:'';
    width:9px;height:9px;
    border-radius:50%;
    background:var(--label-red);
    display:inline-block;
    margin-inline-end:4px;
    animation:wlabPulse 1.2s infinite ease-in-out;
}
@keyframes wlabPulse{0%,100%{opacity:.25}50%{opacity:1}}

.wlab-liveblog-controls{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-bottom:18px;
}

/* ───────── تایم‌لاین ───────── */
.wlab-timeline{display:flex;flex-direction:column;gap:.7rem}

/* ───────── کارت اینتری ───────── */
.wlab-entry{
    background:var(--bg-card);
    border:1px solid var(--border-card);
    border-radius:14px;
    padding:18px 14px;
    box-shadow:0 3px 18px rgba(0,0,0,.09);
    display:flex;
    flex-direction:column;
    margin-bottom:18px;
    transition:background .22s;
    color:var(--text);
    box-sizing:border-box;
}
.wlab-entry.pinned{
    border-right:4px solid var(--pinned);
    background:#1d2531;
}
.wlab-theme-light .wlab-entry.pinned{background:#f0f1f3}

.wlab-entry-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:7px;
}
.wlab-entry-date,.wlab-entry-author{font-size:.86em;opacity:.7;color:var(--text-dim)}
.wlab-entry-content{margin-bottom:8px;font-size:1.06em;line-height:1.65}
.wlab-entry-media{
    display:block;
    max-width:100%;
    margin:6px 0 2px;
    border-radius:8px;
    box-shadow:0 2px 7px rgba(0,0,0,.07);
}

.wlab-label-new{
    background:var(--label-red);
    color:#fff;
    border-radius:6px;
    padding:2px 8px;
    font-size:.89em;
    margin-inline-start:5px;
}
.wlab-label-updated{
    background:var(--label-blue);
    color:#222;
    border-radius:6px;
    padding:2px 8px;
    font-size:.89em;
    margin-inline-start:5px;
}


/* ───────── مدیا وردپرسی ریسپانسیو ───────── */
.wp-video,.wp-video-shortcode,.wlab-entry-content video,
.wlab-entry-content img{
    max-width:100%!important;
    width:100%!important;
    height:auto!important;
    display:block!important;
    margin:10px auto!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
}
.wp-video{width:100%!important;min-width:0!important;padding:0!important}
.wlab-entry-content iframe{
    max-width:100%!important;width:100%!important;min-width:0!important;
    border-radius:9px!important;
    margin:10px auto!important;
    box-sizing:border-box!important;
}

/* نوتیفیکیشن */
#wlab-new-notification{
    position:fixed;
    bottom:35px;
    left:50%;
    transform:translateX(-50%);
    background:var(--pinned);
    color:#fff;
    padding:10px 26px;
    border-radius:17px;
    font-weight:700;
    font-size:1.1em;
    box-shadow:0 4px 16px rgba(60,60,60,.16);
    z-index:999;
    opacity:.98;
    animation:wlabFadeIn .32s;
}
@keyframes wlabFadeIn{from{opacity:0}to{opacity:.98}}

/* ───────── موبایل ───────── */
@media (max-width:700px){
    .wlab-liveblog-container{
        max-width:97vw;
        width:97vw;
        padding:12px 2vw;
        border-radius:18px;
    }
    .wlab-entry{padding:10px 2vw;border-radius:12px;margin-bottom:13px}
    .wlab-liveblog-header,.wlab-liveblog-controls{flex-direction:column;gap:10px}
    .wlab-entry-content{font-size:1em}
    button,.button,#wlab-search,#wlab-filter-type{
        width:100%;
        border-radius:12px;
        font-size:1.1em;
    }
}
.wlab-entry-content img.emoji {
    width: 1.2em;
    height: 1.2em;
    max-width: 1.5em;
    max-height: 1.5em;
    vertical-align: -0.2em;
    display: inline-block;
    display: inline !important;
    vertical-align: middle;
}
.wlab-entry-content p, 
.wlab-entry-content span {
    text-align: inherit !important;  /* جلو وسط‌چینی ناخواسته */
}