/* ═══════════════════════════════════════════════════════════════
   نظام البلاغات — Modal تصميم
   يُحمَّل عبر footer.php على جميع الصفحات
   ═══════════════════════════════════════════════════════════════ */

/* ── Backdrop ── */
.rm-backdrop {
  position: fixed; inset: 0; z-index: 1080;
  background: rgba(7, 7, 26, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
  animation: rm-fade-in .2s ease;
}
.rm-backdrop.rm-open { display: flex; }

@keyframes rm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Dialog ── */
.rm-dialog {
  background: var(--clr-surface, #12122a);
  border: 1px solid var(--clr-border, rgba(255,255,255,.1));
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  animation: rm-slide-up .25s cubic-bezier(.34,1.56,.64,1);
  scrollbar-width: thin;
}
html[data-bs-theme="light"] .rm-dialog,
body[data-bs-theme="light"] .rm-dialog {
  background: #fff;
  box-shadow: 0 12px 60px rgba(15,23,42,.15);
}

@keyframes rm-slide-up {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ── */
.rm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--clr-border, rgba(255,255,255,.1));
  position: sticky; top: 0;
  background: var(--clr-surface, #12122a);
  z-index: 2;
  border-radius: 18px 18px 0 0;
}
html[data-bs-theme="light"] .rm-header,
body[data-bs-theme="light"] .rm-header { background: #fff; }

.rm-title {
  font-size: 1.05rem; font-weight: 800;
  color: var(--clr-txt, #e2e8f0);
  display: flex; align-items: center; gap: 10px;
}
.rm-title-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(239,68,68,.15);
  display: flex; align-items: center; justify-content: center;
  color: #ef4444; font-size: .9rem;
}
.rm-close {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--clr-surface2, rgba(255,255,255,.06));
  border: 1px solid var(--clr-border, rgba(255,255,255,.1));
  color: var(--clr-txt2, #94a3b8);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.rm-close:hover { background: rgba(239,68,68,.15); color: #ef4444; border-color: rgba(239,68,68,.3); }

/* ── Body ── */
.rm-body { padding: 20px 24px 24px; }

/* ── Step indicator ── */
.rm-steps {
  display: flex; gap: 6px; margin-bottom: 22px;
}
.rm-step {
  flex: 1; height: 4px; border-radius: 4px;
  background: var(--clr-border, rgba(255,255,255,.1));
  transition: background .3s;
}
.rm-step.active { background: #ef4444; }
.rm-step.done   { background: #22c55e; }

/* ── Form groups ── */
.rm-group { margin-bottom: 18px; }
.rm-label {
  display: block; font-size: .82rem; font-weight: 700;
  color: var(--clr-txt2, #94a3b8); margin-bottom: 7px;
}
.rm-label .rm-req { color: #ef4444; margin-right: 3px; }
.rm-input,
.rm-select,
.rm-textarea {
  width: 100%;
  background: var(--clr-surface2, rgba(255,255,255,.05));
  border: 1px solid var(--clr-border, rgba(255,255,255,.1));
  border-radius: 10px;
  color: var(--clr-txt, #e2e8f0);
  font-family: inherit; font-size: .9rem;
  padding: 10px 14px;
  outline: none;
  transition: border .2s;
}
.rm-input:focus, .rm-select:focus, .rm-textarea:focus {
  border-color: rgba(239,68,68,.5);
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.rm-textarea { resize: vertical; min-height: 100px; }
.rm-select option { background: #1e1e3a; color: #e2e8f0; }
html[data-bs-theme="light"] .rm-input,
html[data-bs-theme="light"] .rm-select,
html[data-bs-theme="light"] .rm-textarea,
body[data-bs-theme="light"] .rm-input,
body[data-bs-theme="light"] .rm-select,
body[data-bs-theme="light"] .rm-textarea {
  background: #f8fafc; color: #0f172a;
}
html[data-bs-theme="light"] .rm-select option { background: #fff; color: #0f172a; }

/* ── Evidence upload ── */
.rm-evidence-zone {
  border: 2px dashed var(--clr-border, rgba(255,255,255,.15));
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.rm-evidence-zone:hover,
.rm-evidence-zone.drag-over {
  border-color: rgba(239,68,68,.45);
  background: rgba(239,68,68,.04);
}
.rm-evidence-zone input[type="file"] { display: none; }
.rm-evidence-hint { font-size: .8rem; color: var(--clr-txt2, #94a3b8); margin-top: 6px; }
.rm-evidence-previews {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.rm-ev-thumb {
  position: relative; width: 72px; height: 72px;
}
.rm-ev-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--clr-border, rgba(255,255,255,.1));
}
.rm-ev-remove {
  position: absolute; top: -6px; left: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #ef4444; color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; line-height: 1;
}

/* ── Radio option buttons ── */
.rm-options-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.rm-option-btn {
  padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--clr-border, rgba(255,255,255,.12));
  background: var(--clr-surface2, rgba(255,255,255,.04));
  color: var(--clr-txt2, #94a3b8);
  font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s; user-select: none;
}
.rm-option-btn:hover { border-color: rgba(239,68,68,.4); color: #ef4444; }
.rm-option-btn.selected {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.5);
  color: #ef4444;
}
.rm-option-btn input { display: none; }

/* ── Verification step ── */
.rm-verify-box {
  background: rgba(59,130,246,.07);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.rm-verify-title { font-size: 1rem; font-weight: 800; color: var(--clr-txt, #e2e8f0); margin-bottom: 8px; }
.rm-verify-desc  { font-size: .85rem; color: var(--clr-txt2, #94a3b8); line-height: 1.65; }
.rm-verify-perks {
  display: flex; flex-direction: column; gap: 8px;
  margin: 14px 0 0; text-align: right;
}
.rm-verify-perk {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--clr-txt2, #94a3b8);
}
.rm-verify-perk i { color: #22c55e; width: 14px; }

/* OTP input */
.rm-otp-row { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.rm-otp-digit {
  width: 44px; height: 52px;
  background: var(--clr-surface2, rgba(255,255,255,.05));
  border: 2px solid var(--clr-border, rgba(255,255,255,.1));
  border-radius: 10px;
  color: var(--clr-txt, #e2e8f0);
  font-size: 1.25rem; font-weight: 800; text-align: center;
  outline: none; transition: border .2s;
}
.rm-otp-digit:focus {
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.rm-resend-link {
  font-size: .8rem; color: var(--clr-txt2, #94a3b8);
  background: none; border: none; cursor: pointer;
  padding: 0; text-decoration: underline;
  transition: color .2s;
}
.rm-resend-link:hover:not(:disabled) { color: var(--clr-sf, #3b82f6); }
.rm-resend-link:disabled { opacity: .5; cursor: default; text-decoration: none; }

/* ── Buttons ── */
.rm-btn-row { display: flex; gap: 10px; margin-top: 22px; }
.rm-btn {
  flex: 1; padding: 12px 18px; border-radius: 12px;
  font-family: inherit; font-size: .9rem; font-weight: 800;
  cursor: pointer; transition: all .2s; border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.rm-btn-primary {
  background: #ef4444; color: #fff; border-color: #ef4444;
}
.rm-btn-primary:hover { background: #dc2626; border-color: #dc2626; }
.rm-btn-primary:disabled { opacity: .55; cursor: default; }
.rm-btn-secondary {
  background: var(--clr-surface2, rgba(255,255,255,.05));
  color: var(--clr-txt2, #94a3b8);
  border-color: var(--clr-border, rgba(255,255,255,.12));
}
.rm-btn-secondary:hover { border-color: rgba(255,255,255,.25); color: var(--clr-txt, #e2e8f0); }
.rm-btn-success {
  background: #22c55e; color: #fff; border-color: #22c55e;
}
.rm-btn-ghost {
  flex: none; background: none; border: none;
  color: var(--clr-txt2, #94a3b8); font-size: .85rem;
  font-weight: 600; cursor: pointer; padding: 8px 0;
  text-decoration: underline; transition: color .2s;
}
.rm-btn-ghost:hover { color: var(--clr-sf, #3b82f6); }

/* ── Alert ── */
.rm-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px; border-radius: 10px;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 16px; display: none;
}
.rm-alert.rm-alert-visible { display: flex; }
.rm-alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #ef4444; }
.rm-alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.3);  color: #22c55e; }
.rm-alert-info    { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3); color: #3b82f6; }

/* ── Success screen ── */
.rm-success-screen {
  text-align: center; padding: 10px 0 6px;
}
.rm-success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(34,197,94,.15);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #22c55e;
  margin-bottom: 16px;
}
.rm-success-num {
  display: inline-block; background: var(--clr-surface2, rgba(255,255,255,.07));
  border: 1px solid var(--clr-border, rgba(255,255,255,.12));
  border-radius: 8px; padding: 6px 18px;
  font-size: .95rem; font-weight: 800; color: var(--clr-txt, #e2e8f0);
  letter-spacing: .05em; margin: 10px 0 16px;
}

/* ── Spinner ── */
.rm-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rm-spin .6s linear infinite;
  display: none;
}
.rm-btn-primary.loading .rm-spinner { display: inline-block; }
.rm-btn-primary.loading .rm-btn-label { display: none; }

@keyframes rm-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .rm-dialog { border-radius: 14px; max-height: 96vh; }
  .rm-body, .rm-header { padding-inline: 16px; }
  .rm-otp-digit { width: 38px; height: 46px; font-size: 1.1rem; }
}

/* ── Trigger button (زر رفع بلاغ يظهر في صفحات المقال/البحث) ── */
.report-trigger-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 20px;
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
  color: #ef4444; font-size: .82rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.report-trigger-btn:hover {
  background: rgba(239,68,68,.16);
  border-color: rgba(239,68,68,.55);
  transform: translateY(-1px);
}
