/* ============================================================
   Rasid Links Editor — responsive viewport modes
   Phone: concise top bar + explicit bottom-sheet editing.
   Tablet/Desktop: retain the existing full editor controls.
   ============================================================ */

#rasidLinksMoreBtn{display:none;align-items:center;justify-content:center;width:42px;height:42px;flex:none;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-size:20px;line-height:1}
#rasidLinksMoreMenu{position:fixed;top:calc(58px + env(safe-area-inset-top,0px));inset-inline-end:10px;z-index:120;background:#fff;border:1px solid #E2E8F0;border-radius:15px;box-shadow:0 18px 46px rgba(8,15,28,.24);padding:6px;min-width:196px;display:none}
#rasidLinksMoreMenu.on{display:block}
#rasidLinksMoreMenu button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:#13263f;font:700 14px 'Tajawal',sans-serif;text-align:start}
#rasidLinksMoreMenu button:active{background:#EEF4FB}

@media(max-width:640px){
  /* وضع الجوال: لا نضغط أدوات سطح المكتب في صف واحد. */
  .topbar{height:calc(54px + var(--safe-t));padding:var(--safe-t) 10px 0;gap:7px}
  .tb-home,#undo,#redo,#rasidLinksPreviewBtn,#editorLang,#save,.topbar .rasid-ai-draft-btn{display:none!important}
  .tb-brand{width:34px;height:34px}.tb-brand img{width:30px;height:30px}
  .tb-spacer{flex:1}
  #rasidLinksMoreBtn{display:flex}
  .tb-publish,.btn-pub{min-height:42px;height:42px;padding:0 12px;font-size:13px;max-width:136px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .stage{padding-top:calc(54px + var(--safe-t))}
  .canvas{padding:24px 16px calc(136px + var(--safe-b));gap:12px}
  .fabs{inset-inline-start:14px;bottom:calc(16px + var(--safe-b));gap:9px}
  .fab{width:54px;height:54px;border-radius:18px}.fab.small{width:44px;height:44px;border-radius:14px}
  .sheet{max-height:50dvh;border-radius:20px 20px 0 0}.sheet.full{max-height:calc(100dvh - 54px)}
  .sheet-head{padding-inline:14px}.sheet-body{padding:13px 14px 24px}
}

@media(min-width:641px) and (max-width:1000px){
  /* وضع التابلت: الشريط يحتفظ بأدواته، بينما تستفيد اللوحات من مساحة أكبر. */
  .canvas{padding-inline:28px}.sheet{max-width:680px;inset-inline:auto 18px;border-radius:22px 22px 0 0}.sheet.full{max-height:82dvh}
}
