/* ═══ تصويت المنشور ═══
   قبل التصويت: خيارات نظيفة بلا أرقام — الرقم المعروض يوجّه الاختيار.
   بعده: تنمو الأشرطة من الصفر وتُعدّ النسب صعوداً، فيبدو الكشف مكافأةً
   على الضغطة لا مجرّد تبدّل حالة. */

.acf-poll{
  display:grid;
  gap:11px;
  margin-top:14px;
  padding:15px 15px 13px;
  border:1px solid var(--post-line, rgba(255,255,255,.10));
  border-radius:20px;
  background:
    radial-gradient(340px 150px at 100% 0, rgba(124,58,237,.10), transparent 72%),
    var(--post-soft-bg, rgba(255,255,255,.035));
}

.acf-poll-q{
  margin:0;
  font-size:15px;
  font-weight:900;
  line-height:1.75;
  letter-spacing:-.1px;
}

.acf-poll-list{ display:grid; gap:8px; }

/* ── الخيار ─────────────────────────────────────────────────────── */
.acf-poll-opt{
  position:relative;
  display:block;
  width:100%;
  padding:0;
  border:1px solid var(--post-line, rgba(255,255,255,.13));
  border-radius:14px;
  background:var(--post-card-bg, rgba(255,255,255,.05));
  color:inherit;
  font:inherit;
  text-align:start;
  cursor:pointer;
  overflow:hidden;
  isolation:isolate;
  transition:border-color .18s ease, transform .12s ease, background .18s ease;
}
.acf-poll-opt:hover:not(:disabled){
  border-color:rgba(124,58,237,.5);
  background:rgba(124,58,237,.08);
}
.acf-poll-opt:active:not(:disabled){ transform:scale(.988); }
.acf-poll-opt:disabled{ cursor:default; }
.acf-poll-opt:focus-visible{ outline:2px solid rgba(124,58,237,.7); outline-offset:2px; }

/* الشريط طبقة خلف النصّ: لا يزيح شيئاً حين ينمو */
.acf-poll-fill{
  position:absolute;
  inset-block:0;
  inset-inline-start:0;
  z-index:-1;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg, rgba(124,58,237,.34), rgba(6,182,212,.26));
  transition:width .9s cubic-bezier(.22,.9,.3,1);
}
.acf-poll.is-revealed .acf-poll-fill{ width:var(--pct, 0%); }

.acf-poll-opt.is-mine{ border-color:rgba(124,58,237,.62); }
.acf-poll-opt.is-mine .acf-poll-fill{
  background:linear-gradient(90deg, rgba(124,58,237,.52), rgba(6,182,212,.38));
}

.acf-poll-body{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 14px;
  min-height:22px;
}

/* علامة الاختيار: تظهر لاختيارك وحده، وتكبر من الصفر فتُلاحَظ */
.acf-poll-mark{
  display:grid;
  place-items:center;
  width:21px;
  height:21px;
  flex:none;
  border-radius:50%;
  background:rgba(124,58,237,.9);
  color:#fff;
  transform:scale(0);
  opacity:0;
  transition:transform .3s cubic-bezier(.2,1.5,.4,1), opacity .2s ease;
}
.acf-poll-opt.is-mine .acf-poll-mark{ transform:scale(1); opacity:1; }
.acf-poll-opt:not(.is-mine) .acf-poll-mark{ width:0; margin-inline-end:-10px; }

.acf-poll-label{
  flex:1 1 auto;
  min-width:0;
  font-size:14.5px;
  font-weight:800;
  line-height:1.6;
}

/* النسبة محجوزة المكان دائماً: ظهورها لا يزحزح الاسم */
.acf-poll-pct{
  flex:none;
  min-width:46px;
  text-align:end;
  font-size:14px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  opacity:0;
  transform:translateY(4px);
  transition:opacity .35s ease .25s, transform .35s ease .25s;
}
.acf-poll.is-revealed .acf-poll-pct{ opacity:.95; transform:none; }
.acf-poll:not(.is-revealed) .acf-poll-pct{ visibility:hidden; }

/* ── الذيل ──────────────────────────────────────────────────────── */
.acf-poll-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  opacity:.72;
  line-height:1.7;
}
.acf-poll-total b{ font-weight:900; font-variant-numeric:tabular-nums; }
.acf-poll-note{ font-size:11.5px; }

.acf-poll.is-closed .acf-poll-opt{ opacity:.9; }

/* الحركة اختيارية: من أطفأها في نظامه لا تُفرض عليه */
@media (prefers-reduced-motion: reduce){
  .acf-poll-fill,
  .acf-poll-mark,
  .acf-poll-pct{ transition:none; }
}

/* ═══ مؤلّف التصويت في صفحة الكتابة ═══ */
.acf-poll-compose{ margin:10px 0 0; }
.acf-poll-toggle{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 14px; border-radius:999px;
  border:1px solid var(--post-line, rgba(255,255,255,.14));
  background:var(--post-soft-bg, rgba(255,255,255,.05));
  color:inherit; font:inherit; font-size:12.5px; font-weight:800; cursor:pointer;
}
.acf-poll-toggle:hover{ border-color:rgba(124,58,237,.45); background:rgba(124,58,237,.1); }
.acf-poll-compose.is-open .acf-poll-toggle{
  border-color:rgba(124,58,237,.5); background:rgba(124,58,237,.14);
}
.acf-poll-builder{
  display:grid; gap:10px; margin-top:11px; padding:13px;
  border:1px solid var(--post-line, rgba(255,255,255,.11));
  border-radius:18px; background:var(--post-soft-bg, rgba(255,255,255,.035));
}
.acf-poll-builder[hidden]{ display:none; }
.acf-poll-field{ display:grid; gap:5px; font-size:12px; font-weight:700; }
.acf-poll-field select,
.acf-poll-field input,
.acf-poll-options input{
  width:100%; padding:10px 12px; font:inherit; color:inherit;
  border:1px solid var(--post-line, rgba(255,255,255,.14));
  border-radius:12px; background:var(--post-card-bg, rgba(255,255,255,.05));
}
.acf-poll-options{ display:grid; gap:8px; }
.acf-poll-options[hidden]{ display:none; }
.acf-poll-preset{ display:flex; gap:8px; flex-wrap:wrap; }
.acf-poll-preset[hidden]{ display:none; }
.acf-poll-preset span{
  padding:9px 15px; border-radius:12px;
  border:1px dashed var(--post-line, rgba(255,255,255,.16));
  background:var(--post-card-bg, rgba(255,255,255,.04));
  font-size:13px; font-weight:800; opacity:.85;
}
.acf-poll-builder-foot{ display:flex; gap:8px; justify-content:space-between; flex-wrap:wrap; }
.acf-poll-add-option, .acf-poll-remove{
  padding:7px 13px; border-radius:999px; font:inherit; font-size:11.5px; font-weight:800;
  border:1px solid var(--post-line, rgba(255,255,255,.14));
  background:none; color:inherit; cursor:pointer;
}
.acf-poll-add-option[hidden]{ display:none; }
.acf-poll-remove{ border-color:rgba(248,113,113,.32); color:#fca5a5; }
