/* polish.css — لمسات أخيرة موحّدة: شريط التقدم العلوي، حالة تحميل الأزرار، تنبيه الاتصال، وأسطح المتصفح.
   مسطّحة بهوية GazaPX: بلا تدرّج ولا توهّج ولا حواف مستديرة. */

/* ── شريط التقدم العلوي (page-progress.js) ── */
.gpx-progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 9998;
  height: 3px; background: #F16202; pointer-events: none;
  transform: scaleX(0); transform-origin: right center; /* RTL: يبدأ من اليمين */
  opacity: 0; transition: transform .25s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}
[dir="ltr"] .gpx-progress { transform-origin: left center; }
.gpx-progress.is-active { opacity: 1; }
.gpx-progress.is-snap { transition: opacity .3s ease; }

/* ── زر قيد الإرسال: دوّار صغير مكان الأيقونة ويمنع النقر المزدوج ── */
.is-submitting { position: relative; cursor: progress; pointer-events: none; opacity: .85; }
.is-submitting::after {
  content: ""; display: inline-block; width: .9em; height: .9em; margin-inline-start: .5em;
  border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%;
  vertical-align: -.12em; animation: gpx-spin .7s linear infinite;
}
@keyframes gpx-spin { to { transform: rotate(360deg); } }

/* ── شريط انقطاع الاتصال ── */
.gpx-offline {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 9997;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); text-align: center;
  background: #0B0B38; color: #fff; font-size: .875rem; font-weight: 700;
  border-block-start: 3px solid #F16202;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.gpx-offline.is-shown { transform: none; }
.gpx-offline.is-back { border-block-start-color: #0E9F6E; }

/* ── أسطح المتصفح بهوية الموقع ── */
::selection { background: #F16202; color: #0B0B38; }
input, textarea, select { caret-color: #F16202; }
html { scroll-padding-block-start: 6rem; -webkit-tap-highlight-color: transparent; text-size-adjust: 100%; }
body:not(.is-dashboard) { scrollbar-width: thin; scrollbar-color: #7C7F96 transparent; }
table, .tnum, [data-counter] { font-variant-numeric: tabular-nums; }
img { image-rendering: auto; }
a:not([class]) { text-underline-offset: .2em; text-decoration-thickness: 1px; }

@media (prefers-reduced-motion: reduce) {
  .gpx-progress, .gpx-offline { transition-duration: .01ms; }
  .is-submitting::after { animation-duration: 2s; }
}
@media print { .gpx-progress, .gpx-offline { display: none; } }
