/* قائمة الموقع الجانبية — يمين الشاشة */
.sm-handle {
  position: fixed; top: 50%; right: 0; z-index: 900; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 9px; border: 1px solid rgba(217, 188, 122, 0.45); border-right: 0;
  border-radius: 16px 0 0 16px; background: rgba(11, 61, 51, 0.94); color: #f1e2bd;
  box-shadow: -6px 8px 24px rgba(3, 30, 24, 0.28); cursor: pointer; backdrop-filter: blur(8px);
  transition: right 0.35s cubic-bezier(.2,.8,.2,1), background 0.2s;
  font-family: inherit;
}
.sm-handle:hover { background: #0f4a3d; }
.sm-handle:focus-visible { outline: 3px solid #d9bc7a; outline-offset: 2px; }
.sm-handle.is-open { right: min(300px, 84vw); }
.sm-handle-text { writing-mode: vertical-rl; font-size: 12.5px; font-weight: 600; letter-spacing: 0.5px; }
.sm-burger { display: grid; gap: 3.5px; width: 16px; }
.sm-burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s, opacity 0.2s; }
.sm-handle.is-open .sm-burger i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.sm-handle.is-open .sm-burger i:nth-child(2) { opacity: 0; }
.sm-handle.is-open .sm-burger i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.sm-back { position: fixed; inset: 0; z-index: 898; background: rgba(2, 24, 19, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.sm-back.is-open { opacity: 1; pointer-events: auto; }

.sm-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 899; width: min(300px, 84vw);
  display: flex; flex-direction: column; gap: 6px; padding: 22px 16px 28px; overflow-y: auto;
  background: linear-gradient(180deg, #0c4337, #072d25); color: #e9f2ec;
  box-shadow: -18px 0 48px rgba(2, 24, 19, 0.35);
  transform: translateX(105%); transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
  direction: rtl; text-align: right;
}
.sm-panel.is-open { transform: none; }
.sm-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 16px; border-bottom: 1px solid rgba(233, 242, 236, 0.12); margin-bottom: 4px; }
.sm-brand { color: #f4e3b5; font-size: 26px; font-weight: 800; text-decoration: none; line-height: 1.2; }
.sm-brand small { display: block; font-size: 12px; font-weight: 400; color: #a9c6b9; }
.sm-close { width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #e9f2ec; font-size: 22px; line-height: 1; cursor: pointer; }
.sm-close:hover { background: rgba(255, 255, 255, 0.16); }
.sm-group { display: grid; gap: 2px; padding: 10px 0 6px; }
.sm-group h2 { margin: 0 8px 6px; font-size: 12px; font-weight: 600; color: #d9bc7a; letter-spacing: 0.3px; }
.sm-group a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: #dbe8e1; font-size: 14.5px; text-decoration: none; transition: background 0.15s, color 0.15s; }
.sm-group a svg { flex-shrink: 0; opacity: 0.8; }
.sm-group a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sm-group a.on { background: #d9bc7a; color: #0b2c24; font-weight: 700; }
.sm-group a.on svg { opacity: 1; }
.sm-group a:focus-visible { outline: 2px solid #d9bc7a; outline-offset: 1px; }

@media (max-width: 980px) {
  /* فوق شريط التنقل السفلي في لوحات الشركات */
  .sm-handle { top: auto; bottom: calc(120px + env(safe-area-inset-bottom)); transform: none; padding: 10px 7px; gap: 0; border-radius: 12px 0 0 12px; }
  .sm-handle-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-panel, .sm-handle, .sm-back { transition: none; }
}
@media print { .sm-handle, .sm-panel, .sm-back { display: none; } }

/* لا تظهر فوق النوافذ المنبثقة */
body:has(.bz-modal-back) .sm-handle { display: none; }

/* ===== القائمة المثبّتة (شاشات كبيرة) ===== */
.sm-head-btns { display: flex; align-items: center; gap: 6px; }
.sm-pinbtn { height: 30px; padding: 0 12px; border: 1px solid rgba(217, 188, 122, 0.45); border-radius: 999px; background: transparent; color: #f1e2bd; font: inherit; font-size: 12.5px; cursor: pointer; }
.sm-pinbtn:hover { background: rgba(217, 188, 122, 0.16); }
@media (min-width: 981px) {
  html.sm-pin body { padding-right: 260px; }
  html.sm-pin .sm-panel { width: 260px; transform: none; box-shadow: -1px 0 0 rgba(217, 188, 122, 0.25); z-index: 90; }
  html.sm-pin .sm-handle, html.sm-pin .sm-back { display: none; }
}
