/* Alsiraj Reels Bar — مینیمال، هماهنگ با السراج (سبز/طلایی)، RTL */
.alsiraj-reels {
    --ar-primary: #0e6b4f;
    --ar-gold: #c9a227;
    --ar-ink: #2b2b2b;
    --ar-bg: #f7f5ef;
    margin: 18px 0 !important;
    margin-inline: 0 !important;
    width: max-content;
    max-width: 100%;
    direction: rtl;
    font-family: inherit;
}

/* سربرگ نوار */
.alsiraj-reels__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--ar-gold);
    width: 100%;
    max-width: 100%;
}
.alsiraj-reels__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ar-primary);
}
.alsiraj-reels__icon {
  display: block;
  width: var(--alsiraj-reels-icon-size, 42px);
  height: var(--alsiraj-reels-icon-size, 42px);
  flex: 0 0 var(--alsiraj-reels-icon-size, 42px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.alsiraj-reels__title svg { color: var(--ar-gold); }
.alsiraj-reels__archive {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ar-primary);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--ar-gold);
    border-radius: 999px;
    background: #fff;
    transition: background .2s ease, color .2s ease;
}
.alsiraj-reels__archive:hover { background: var(--ar-primary); color: #fff; }

/* نوار افقی اسکرولی */
.alsiraj-reels__bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    /* Keep hover elevation and keyboard focus safely inside the scroll area. */
    padding: 7px 2px 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    width: max-content;
    max-width: 100%;
}
.alsiraj-reels__bar.is-dragging { cursor: grabbing; }
.alsiraj-reels__bar::-webkit-scrollbar { display: none; }
.alsiraj-reels--archive { width: 100%; }
.alsiraj-reels--archive .alsiraj-reels__head { width: 100%; }
.alsiraj-reels__bar--archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); width: 100%; max-width: none; overflow: visible; cursor: default; }
.alsiraj-reels__bar--archive .alsiraj-reels__card { width: 100%; }
@media (max-width: 600px) { .alsiraj-reels__bar--archive { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* کارت هر ریلز */
.alsiraj-reels__card {
    flex: 0 0 auto;
    width: 136px;
    padding: 0;
    margin: 0;
    border: 1px solid #e6e2d6;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    -webkit-user-drag: none;
    text-align: right;
    font: inherit;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.alsiraj-reels__card > * { pointer-events: none; }
.alsiraj-reels__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(14, 107, 79, .16);
    border-color: var(--ar-gold);
}
.alsiraj-reels__card:focus-visible {
    outline: 2px solid var(--ar-primary);
    outline-offset: -3px;
}

.alsiraj-reels__thumb {
    position: relative;
    display: block;
    aspect-ratio: 9 / 13;
    background: var(--ar-bg);
    overflow: hidden;
}
.alsiraj-reels__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.alsiraj-reels__card:hover .alsiraj-reels__thumb img { transform: scale(1.06); }
.alsiraj-reels__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--ar-primary);
    opacity: .55;
}
.alsiraj-reels__preview { width: 100%; height: 100%; object-fit: cover; display: block; }

/* دکمه پخش */
.alsiraj-reels__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(14, 107, 79, .85);
    border: 2px solid rgba(255,255,255,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline-start: 4px;
    transition: background .25s ease, transform .25s ease;
}
.alsiraj-reels__card:hover .alsiraj-reels__play {
    background: var(--ar-gold);
    transform: scale(1.08);
}

.alsiraj-reels__duration {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    direction: ltr;
}

.alsiraj-reels__caption {
    display: block !important;
    box-sizing: border-box;
    height: 62px;
    max-height: 62px;
    padding: 8px 6px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    color: var(--ar-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: center !important;
}
.alsiraj-reels__caption-text {
    display: block;
    max-height: 44.2px;
    overflow: hidden;
    line-height: 22.1px;
    direction: rtl;
    text-align: center !important;
}
.alsiraj-reels__caption { position: relative; }
.alsiraj-reels__card.is-truncated .alsiraj-reels__caption::after {
    content: '…';
    position: absolute;
    inset-inline-end: 6px;
    bottom: 8px;
    padding-inline-start: 3px;
    background: #fff;
}

/* موبایل */
@media (max-width: 600px) {
    .alsiraj-reels__card { width: 126px; }
    .alsiraj-reels__title { font-size: 17px; }
}

/* ============ لایت‌باکس پخش درجا ============ */
.alsiraj-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.alsiraj-lightbox[hidden] { display: none; }
.alsiraj-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 16, .85);
    backdrop-filter: blur(3px);
}
.alsiraj-lightbox__panel {
    position: relative;
    width: min(880px, 100%);
    background: #101815;
    border: 1px solid rgba(201, 162, 39, .5);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.alsiraj-lightbox__close {
    position: absolute;
    top: -14px;
    inset-inline-end: -14px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--ar-gold);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.alsiraj-lightbox__close:hover { background: #b28f1c; }
.alsiraj-lightbox__stage video {
    width: 100%;
    max-height: 70vh;
    display: block;
    border-radius: 10px;
    background: #000;
}
.alsiraj-lightbox__title {
    margin: 10px 4px 2px;
    color: #f2ede0;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
}

body.alsiraj-lightbox-open { overflow: hidden; }

/* Immersive short-video player */
.alsiraj-lightbox { padding: 12px; background: rgba(0,0,0,.5); }
.alsiraj-lightbox__backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(10px); }
.alsiraj-lightbox__panel { width: min(430px, 100%); height: min(820px, calc(100vh - 24px)); padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #080d0c; }
.alsiraj-lightbox__stage { position: relative; height: 100%; cursor: pointer; background: #000; }
.alsiraj-lightbox__stage video { width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: contain; }
.alsiraj-lightbox__shade { position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(0,0,0,.3),transparent 35%,transparent 55%,rgba(0,0,0,.75)); }
.alsiraj-lightbox__panel > .alsiraj-lightbox__close {
    z-index: 4;
    top: 16px;
    inset-inline-end: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(0, 0, 0, .65);
    border: 1px solid rgba(255, 255, 255, .4);
}
.alsiraj-lightbox__panel > .alsiraj-lightbox__close svg {
    display: block;
    flex: none;
    width: 22px;
    height: 22px;
}
.alsiraj-lightbox__nav { position:absolute; z-index:4; top:50%; transform:translateY(-50%); width:40px; height:56px; border:0; color:#fff; background:rgba(0,0,0,.35); font-size:42px; line-height:1; cursor:pointer; }
.alsiraj-lightbox__nav--next { inset-inline-end:10px; border-radius:12px; }.alsiraj-lightbox__nav--prev { inset-inline-start:10px; border-radius:12px; }
.alsiraj-lightbox__nav:disabled { opacity: .28; cursor: default; pointer-events: none; }
.alsiraj-lightbox__progress { position:absolute; z-index:3; top:8px; inset-inline:12px; height:3px; overflow:hidden; border-radius:3px; background:rgba(255,255,255,.35); }.alsiraj-lightbox__progress span { display:block; height:100%; width:0; background:#fff; }
.alsiraj-lightbox__meta { position:absolute; z-index:3; right:16px; left:82px; bottom:18px; color:#fff; text-align:right; pointer-events:none; }
.alsiraj-lightbox__identity { display:flex; align-items:center; gap:9px; direction:rtl; }.alsiraj-lightbox__avatar { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:50%; background:var(--ar-gold); color:#063b31; font-weight:800; }.alsiraj-lightbox__identity strong { font-size:14px; }.alsiraj-lightbox__identity p { margin:2px 0 0; font-size:15px; font-weight:700; }
.alsiraj-lightbox__description { margin:10px 0 0; max-height:42px; overflow:hidden; font-size:13px; line-height:1.6; }.alsiraj-lightbox__description.is-expanded { max-height:120px; }
.alsiraj-lightbox__actions { position:absolute; z-index:4; bottom:18px; inset-inline-end:14px; display:grid; gap:14px; }.alsiraj-lightbox__actions button { display:grid; justify-items:center; gap:3px; border:0; padding:0; color:#fff; background:transparent; font:600 11px inherit; cursor:pointer; }.alsiraj-lightbox__actions svg { width:29px; height:29px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }.alsiraj-lightbox__actions button.is-liked { color:#ff496c; }.alsiraj-lightbox__actions button.is-liked svg { fill:currentColor; }
.alsiraj-sound-slash { display:none; }.alsiraj-lightbox__actions button.is-muted .alsiraj-sound-wave { display:none; }.alsiraj-lightbox__actions button.is-muted .alsiraj-sound-slash { display:block; }
.alsiraj-lightbox__toast { position:absolute; z-index:6; right:50%; bottom:96px; transform:translateX(50%) translateY(8px); max-width:80%; padding:9px 13px; border-radius:999px; color:#fff; background:rgba(0,0,0,.76); font-size:12px; opacity:0; pointer-events:none; transition:opacity .2s ease,transform .2s ease; white-space:nowrap; }.alsiraj-lightbox__toast.is-visible { opacity:1; transform:translateX(50%) translateY(0); }
.alsiraj-share-sheet { position:absolute; z-index:7; inset-inline:16px; bottom:76px; padding:13px; border:1px solid rgba(255,255,255,.2); border-radius:14px; color:#fff; background:rgba(14,29,26,.96); box-shadow:0 12px 30px rgba(0,0,0,.4); text-align:right; }.alsiraj-share-sheet[hidden] { display:none; }.alsiraj-share-sheet strong { display:block; margin-bottom:10px; font-size:13px; }.alsiraj-share-sheet__links { display:flex; gap:8px; }.alsiraj-share-sheet__links a,.alsiraj-share-sheet__links button { display:grid; place-items:center; flex:1; min-width:0; height:38px; border:0; border-radius:9px; padding:0; color:#fff; text-decoration:none; cursor:pointer; }.alsiraj-share-sheet__links svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.alsiraj-share--telegram { background:#229ed9; }.alsiraj-share--telegram svg,.alsiraj-share--facebook svg { fill:currentColor; stroke:none; }.alsiraj-share--whatsapp { background:#25d366; }.alsiraj-share--instagram { background:linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }.alsiraj-share--facebook { background:#1877f2; }.alsiraj-share--copy { background:#b58d20; }
@media (max-width: 620px) { .alsiraj-lightbox { padding:0; }.alsiraj-lightbox__panel { width:100%; height:100%; border-radius:0; }.alsiraj-lightbox__nav { display:none; } }


/* Balanced short-video cards */
.alsiraj-reels__card { position: relative; background: #101815; }
.alsiraj-reels__thumb { aspect-ratio: 9 / 16 !important; }
.alsiraj-reels__caption { position: absolute; z-index: 2; inset-inline: 0; bottom: 0; height: auto; max-height: 58px; padding: 24px 9px 9px; color: #fff; background: linear-gradient(180deg, transparent 0%, rgba(5, 15, 12, .86) 62%, rgba(5, 15, 12, .96) 100%); }
.alsiraj-reels__caption-text { max-height: 40px; color: #fff; }
.alsiraj-reels__card.is-truncated .alsiraj-reels__caption::after { background: transparent; }


/* Match the site typography on reel descriptions */
.alsiraj-reels__caption,
.alsiraj-reels__caption-text { font-family: alibaba, "ArabicUIDisplay", sans-serif !important; font-weight: 600; }


/* Keep reel descriptions inside the bordered card */
.alsiraj-reels__caption { box-sizing: border-box; height: auto; max-height: none; padding: 20px 9px 8px; overflow: hidden; }
.alsiraj-reels__caption-text { box-sizing: border-box; max-height: 40px; line-height: 20px; overflow: hidden; }
