/* ===== شمعدان: شاشة التحميل + الماوس المخصص ===== */

/* ---------- شاشة التحميل ---------- */
#shm-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  transition: opacity .55s ease, visibility .55s ease;
}
#shm-loader.shm-hide { opacity: 0; visibility: hidden; pointer-events: none; }

#shm-loader .shm-logo {
  width: min(280px, 56vw);
  height: auto;
  animation: shm-breathe 2.4s ease-in-out infinite;
  -webkit-user-drag: none;
  user-select: none;
}
#shm-loader .shm-dots {
  display: flex;
  gap: 10px;
  margin-top: 34px;
  direction: ltr;
}
#shm-loader .shm-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9a45c;
  opacity: .25;
  animation: shm-dot 1.2s ease-in-out infinite;
}
#shm-loader .shm-dots i:nth-child(2) { animation-delay: .18s; }
#shm-loader .shm-dots i:nth-child(3) { animation-delay: .36s; }

@keyframes shm-breathe {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(201,164,92,0)); }
  50%      { transform: scale(1.04); filter: drop-shadow(0 6px 14px rgba(201,164,92,.35)); }
}
@keyframes shm-dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0) scale(.85); }
  40%           { opacity: 1;   transform: translateY(-6px) scale(1.1); }
}

/* لا نخفي الصفحة لو الجافاسكربت مقفول */
html:not(.shm-js) #shm-loader { display: none; }
html.shm-lock { overflow: hidden; }

/* ---------- الماوس بشكل الشعلة (للأجهزة اللي فيها ماوس بس) ---------- */
@media (hover: hover) and (pointer: fine) {
  html, body {
    cursor: url("cursor.png") 6 2, auto;
    cursor: image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 6 2, auto;
  }
  a, button, [role="button"], summary, label[for], select,
  input[type="submit"], input[type="button"], input[type="checkbox"], input[type="radio"],
  .clickable, [onclick] {
    cursor: url("cursor-pointer.png") 8 2, pointer;
    cursor: image-set(url("cursor-pointer.png") 1x, url("cursor-pointer@2x.png") 2x) 8 2, pointer;
  }
  input[type="text"], input[type="search"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="number"], input:not([type]), textarea {
    cursor: text;
  }
  /* علامة الانتظار: شعلة + دايرة صغيرة */
  html.shm-busy, html.shm-busy *,
  html.shm-busy a, html.shm-busy button {
    cursor: url("cursor-wait.png") 8 2, wait !important;
    cursor: image-set(url("cursor-wait.png") 1x, url("cursor-wait@2x.png") 2x) 8 2, wait !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #shm-loader .shm-logo, #shm-loader .shm-dots i { animation: none; }
  #shm-loader .shm-dots i { opacity: .7; }
}
