/* ========== Report Post – Frontend Styles ========== */
:root {
  --rp-blue:    #3b82f6;
  --rp-blue-dk: #2563eb;
  --rp-red:     #ef4444;
  --rp-gray:    #6b7280;
  --rp-border:  #e5e7eb;
  --rp-bg:      #f9fafb;
  --rp-white:   #ffffff;
  --rp-text:    #111827;
  --rp-radius:  12px;
  --rp-shadow:  0 20px 60px rgba(0,0,0,.18);
}

/* ---- Trigger Button ---- */
.rp-wrap {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rp-border);
  display: block;
}

.rp-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1.5px solid var(--rp-border);
  color: var(--rp-gray);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  font-family: inherit;
}
.rp-trigger-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.rp-trigger-btn:hover {
  border-color: var(--rp-red);
  color: var(--rp-red);
  background: #fef2f2;
}

/* ---- Overlay ---- */
.rp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  z-index: 999999;
  display: none; /* JS sets to flex when open */
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .25s;
  box-sizing: border-box;
}
.rp-overlay.rp-visible { opacity: 1; }

/* ---- Modal ---- */
.rp-modal {
  background: var(--rp-white);
  border-radius: var(--rp-radius);
  box-shadow: var(--rp-shadow);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(.97);
  transition: transform .25s;
}
.rp-overlay.rp-visible .rp-modal { transform: translateY(0) scale(1); }

.rp-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  font-size: 22px; color: rgba(255,255,255,.7);
  cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  transition: background .15s, color .15s;
  z-index: 10;
}
.rp-close:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---- Modal Header ---- */
.rp-modal-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: #fff;
  padding: 28px 28px 22px;
  border-radius: var(--rp-radius) var(--rp-radius) 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rp-flag-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.rp-flag-icon svg { width: 22px; height: 22px; color: #fff; }
.rp-modal-header h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; }
.rp-modal-header p  { margin: 0; font-size: 13px; opacity: .8; }

/* ---- Modal Body ---- */
.rp-modal-body { padding: 20px 24px 24px; }

/* ---- Reason Cards ---- */
.rp-reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.rp-reason-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1.5px solid var(--rp-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
  user-select: none;
}
.rp-reason-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.rp-reason-card:hover  { border-color: var(--rp-blue); background: #eff6ff; }
.rp-reason-card.rp-selected { border-color: var(--rp-blue); background: #eff6ff; }

.rp-reason-icon { font-size: 20px; flex-shrink: 0; min-width: 24px; text-align: center; }
.rp-reason-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.rp-reason-text strong { font-size: 13.5px; color: var(--rp-text); font-weight: 600; display: block; }
.rp-reason-text small  { font-size: 11.5px; color: var(--rp-gray); display: block; }

.rp-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--rp-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent;
  flex-shrink: 0; transition: .15s;
  font-style: normal;
}
.rp-reason-card.rp-selected .rp-check {
  background: var(--rp-blue); border-color: var(--rp-blue); color: #fff;
}

/* ---- Fields ---- */
.rp-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.rp-row    { display: flex; gap: 10px; }
.rp-row .rp-input { flex: 1; min-width: 0; }

.rp-input, .rp-textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--rp-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--rp-text);
  font-family: inherit;
  background: var(--rp-white);
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.rp-input:focus, .rp-textarea:focus {
  border-color: var(--rp-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.rp-textarea { resize: vertical; min-height: 72px; }

/* ---- Notice ---- */
.rp-notice {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.4;
}
.rp-notice-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.rp-notice-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---- Footer ---- */
.rp-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rp-border);
}

.rp-btn-cancel {
  background: none;
  border: 1.5px solid var(--rp-border);
  color: var(--rp-gray);
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: .15s;
}
.rp-btn-cancel:hover { border-color: #9ca3af; color: var(--rp-text); }

.rp-btn-submit {
  background: var(--rp-blue);
  border: none;
  color: #fff;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
}
.rp-btn-submit:hover:not(:disabled) { background: var(--rp-blue-dk); }
.rp-btn-submit:disabled { background: #93c5fd; cursor: not-allowed; }

/* Spinner */
.rp-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rp-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes rp-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .rp-row { flex-direction: column; }
  .rp-modal-header { padding: 20px; }
  .rp-modal-body  { padding: 16px; }
  .rp-modal-footer { flex-direction: column-reverse; }
  .rp-btn-cancel, .rp-btn-submit { width: 100%; justify-content: center; }
}
