/* شورتس دجلة */
.shorts { position: relative; height: calc(100dvh - 44px); display: flex; flex-direction: column; }
.sh-top { display: flex; align-items: center; gap: 8px; padding: 0 4px 10px; }
.sh-top h1 { font-family: var(--display); font-size: 28px; margin: 0; }
.sh-pending { display: grid; gap: 6px; }
.sh-pend { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 8px; border-radius: 14px; font-size: 14px; background: var(--glass-2); border: 1px solid var(--edge); }
.sh-pend.bad { border-color: rgba(229,38,58,.5); }
.sh-pend .icon-btn { margin-inline-start: auto; width: 30px; height: 30px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--edge-hi); border-top-color: var(--red-hi); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sh-feed {
  flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; border-radius: var(--r-xl);
}
.sh-feed::-webkit-scrollbar { display: none; }
.short {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden; background: #000;
}
.short + .short { margin-top: 0; }
.short video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.short video.land { object-fit: contain; }
.sh-tap { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.sh-paused { position: absolute; z-index: 2; pointer-events: none; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s; }
.short.paused .sh-paused { opacity: 1; transform: none; }
.short::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none; background: linear-gradient(transparent, rgba(0,0,0,.75)); }

.sh-actions { position: absolute; z-index: 3; inset-inline-end: 10px; bottom: 90px; display: grid; justify-items: center; gap: 16px; }
.sh-actions button, .sh-av { display: grid; justify-items: center; gap: 2px; color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.sh-actions button svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.sh-actions .liked { color: var(--red-hi); }
.sh-actions .liked svg { fill: currentColor; filter: drop-shadow(0 0 10px var(--red-glow)); }
.sh-actions .pop svg { animation: pop-heart .35s ease-out; }
@keyframes pop-heart { 40% { transform: scale(1.35); } }
.sh-av .av { box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(0,0,0,.6); }

.sh-info { position: absolute; z-index: 3; inset-inline-start: 14px; inset-inline-end: 80px; bottom: 22px; color: #fff; display: grid; gap: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.8); pointer-events: none; }
.sh-info a { pointer-events: auto; }
.sh-name { display: flex; align-items: baseline; gap: 8px; }
.sh-name small { opacity: .75; font-size: 12px; }
.sh-info p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 4.8em; overflow: hidden; }
.sh-meta { display: flex; gap: 10px; opacity: .75; font-size: 12px; }
.sh-progress { position: absolute; z-index: 3; inset: auto 0 0 0; height: 3px; background: rgba(255,255,255,.18); direction: ltr; }
.sh-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red-hi), var(--red)); box-shadow: 0 0 8px var(--red-glow); }
.sh-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; color: var(--muted); }

/* الرفع */
.pick { display: grid; justify-items: center; gap: 6px; padding: 30px 16px; border-radius: var(--r-lg); border: 2px dashed var(--edge-hi); cursor: pointer; text-align: center; font-weight: 600; color: var(--ink); }
.pick:hover { border-color: var(--red); background: rgba(229,38,58,.06); }
#upPrev { width: 100%; max-height: 45dvh; border-radius: var(--r-md); background: #000; }
.upbar { position: relative; height: 30px; border-radius: 999px; overflow: hidden; background: rgba(0,0,0,.45); border: 1px solid var(--edge); direction: ltr; }
.upbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--red-deep), var(--red-hi)); transition: width .2s; }
.upbar span { position: relative; display: grid; place-items: center; height: 100%; font-size: 13px; font-weight: 700; }

/* التعليقات من تحت */
.modal.bottom { place-items: end center; padding: 0; }
.modal.bottom .sheet { width: min(560px, 100%); border-radius: 26px 26px 0 0; max-height: 75dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: rise .2s ease-out; }
.sh-clist { max-height: 50dvh; overflow-y: auto; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

/* الكمبيوتر: الفيديو بنسبة الموبايل بالنص */
@media (min-width: 761px) {
  body.in-shorts .view { max-width: 560px; padding-bottom: 16px; }
  .short { width: min(100%, calc((100dvh - 120px) * 9 / 16)); margin-inline: auto; border-radius: var(--r-xl); }
}
/* الموبايل: ملء الشاشة */
@media (max-width: 760px) {
  body.in-shorts .view { padding: 0; max-width: none; }
  .shorts { height: 100dvh; }
  .sh-top { position: absolute; z-index: 5; top: 0; inset-inline: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
  .sh-top .icon-btn { color: #fff; }
  .sh-pending { position: absolute; z-index: 5; top: calc(64px + env(safe-area-inset-top)); inset-inline: 12px; }
  .sh-feed { border-radius: 0; }
  .sh-actions { bottom: calc(118px + env(safe-area-inset-bottom)); }
  .sh-info { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sh-progress { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .short::after { height: 55%; }
}
.sh-actions .flag { font-size: 22px; font-style: normal; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
