/* پنجره‌ی انتخاب بخش نمایش‌داده‌شده‌ی عکس پروفایل — js/avatarcrop.js
   فقط از متغیرهای تم استفاده می‌کند، پس با همه‌ی تم‌ها هماهنگ است. */
html.avc-lock, html.avc-lock body{ overflow:hidden; }
.avc-overlay{
  position:fixed; inset:0; z-index:100001; display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.68); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  padding:16px; animation:avcFade .2s ease;
}
@keyframes avcFade{ from{opacity:0} to{opacity:1} }
.avc-box{
  background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:22px;
  box-shadow:0 30px 80px rgba(0,0,0,.6); padding:20px 20px 18px; max-width:100%;
  display:flex; flex-direction:column; align-items:center; gap:12px; max-height:100%; overflow:auto;
  font-family:var(--font);
}
.avc-title{ font-weight:800; font-size:16px; color:var(--ink); }
.avc-hint{ font-size:12px; color:var(--text-muted); text-align:center; line-height:1.8; max-width:460px; }
.avc-stage{
  position:relative; direction:ltr; border-radius:14px; overflow:hidden; line-height:0;
  background:
    conic-gradient(#2a2a2d 25%, #333 0 50%, #2a2a2d 0 75%, #333 0) 0 0/16px 16px;
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:crosshair;
  box-shadow:0 0 0 1px var(--border);
}
.avc-canvas{ display:block; }
.avc-ring{
  position:absolute; border-radius:50%; cursor:grab; outline:none;
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.45), 0 0 0 4px rgba(var(--primary-rgb),.55), inset 0 0 0 1px rgba(0,0,0,.25);
  transition:box-shadow .2s;
}
.avc-ring::before, .avc-ring::after{            /* خطوط راهنمای سه‌گانه‌ی محو داخل دایره */
  content:""; position:absolute; inset:0; border-radius:50%; pointer-events:none;
}
.avc-ring::before{ background:linear-gradient(to right, transparent 33%, rgba(255,255,255,.22) 33% calc(33% + 1px), transparent calc(33% + 1px) 66%, rgba(255,255,255,.22) 66% calc(66% + 1px), transparent calc(66% + 1px)); }
.avc-ring::after{ background:linear-gradient(to bottom, transparent 33%, rgba(255,255,255,.22) 33% calc(33% + 1px), transparent calc(33% + 1px) 66%, rgba(255,255,255,.22) 66% calc(66% + 1px), transparent calc(66% + 1px)); }
.avc-ring:focus-visible{ box-shadow:0 0 0 1px rgba(0,0,0,.45), 0 0 0 5px rgba(var(--primary-rgb),.9); }
.avc-ring.avc-drag{ cursor:grabbing; box-shadow:0 0 0 1px rgba(0,0,0,.45), 0 0 0 6px rgba(var(--primary-rgb),.8), 0 0 26px rgba(var(--primary-rgb),.5); }
.avc-zoom{ display:flex; align-items:center; gap:10px; width:min(100%,360px); font-size:11.5px; color:var(--text-muted); }
.avc-zoom input[type=range]{ flex:1; accent-color:var(--primary); height:4px; cursor:pointer; }
.avc-preview-row{ display:flex; align-items:center; gap:10px; }
.avc-preview{ width:56px; height:56px; border-radius:50%; overflow:hidden; box-shadow:0 0 0 2px var(--border); background:var(--surface-alt); }
.avc-preview canvas{ width:100%; height:100%; display:block; }
.avc-preview-lbl{ font-size:12px; color:var(--text-muted); }
.avc-actions{ display:flex; gap:10px; margin-top:2px; }
.avc-actions .btn-primary, .avc-actions .btn-small{ min-width:96px; justify-content:center; }
@media (max-width:520px){
  .avc-box{ padding:16px 12px 14px; border-radius:18px; }
  .avc-hint{ font-size:11.5px; }
}
@media (prefers-reduced-motion:reduce){ .avc-overlay{ animation:none; } }
