/* ── Report / Feedback Modal ── */

/* Floating trigger button */
.rm-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 999px;
  color: #94a3b8;
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.rm-trigger:hover {
  background: #263348;
  border-color: #6C63FF;
  color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(108,99,255,.25);
}
.rm-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Overlay */
.rm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 0 0;
}
@media (min-width: 520px) {
  .rm-overlay { align-items: center; padding: 24px; }
}

/* Modal card */
.rm-modal {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 28px 24px 32px;
  position: relative;
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
}
@media (min-width: 520px) {
  .rm-modal { border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
}

/* Header */
.rm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.rm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}
.rm-title svg { width: 20px; height: 20px; color: #6C63FF; }
.rm-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.rm-close:hover { background: #263348; color: #e2e8f0; }
.rm-close svg { width: 16px; height: 16px; }

/* Type chips */
.rm-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.rm-type-btn {
  padding: 6px 14px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 999px;
  color: #94a3b8;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.rm-type-btn:hover { background: #263348; color: #e2e8f0; }
.rm-type-btn.active {
  background: rgba(108,99,255,.15);
  border-color: #6C63FF;
  color: #a5b4fc;
}

/* Fields */
.rm-field { margin-bottom: 14px; }
.rm-label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 6px;
}
.rm-label span { color: #f87171; margin-left: 2px; }
.rm-textarea,
.rm-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: .875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}
.rm-textarea { min-height: 100px; }
.rm-textarea:focus,
.rm-input:focus {
  border-color: #6C63FF;
  box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}
.rm-textarea::placeholder,
.rm-input::placeholder { color: #475569; }
.rm-error-msg {
  font-size: .75rem;
  color: #f87171;
  margin-top: 4px;
}

/* Actions */
.rm-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.rm-btn-cancel {
  flex: 1;
  padding: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #94a3b8;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.rm-btn-cancel:hover { background: #263348; color: #e2e8f0; }
.rm-btn-submit {
  flex: 2;
  padding: 10px;
  background: linear-gradient(135deg, #6C63FF, #4ECDC4);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .18s, transform .15s;
}
.rm-btn-submit:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.rm-btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.rm-btn-submit svg { width: 15px; height: 15px; }

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

/* Submit error */
.rm-submit-error {
  margin-top: 10px;
  font-size: .8rem;
  color: #f87171;
  text-align: center;
}

/* Success state */
.rm-success {
  text-align: center;
  padding: 12px 0 4px;
}
.rm-success-icon {
  width: 56px;
  height: 56px;
  background: rgba(78,205,196,.12);
  border: 2px solid #4ECDC4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.rm-success-icon svg { width: 26px; height: 26px; color: #4ECDC4; }
.rm-success h3 { font-size: 1.1rem; font-weight: 700; color: #f1f5f9; margin-bottom: 8px; }
.rm-success p  { font-size: .875rem; color: #94a3b8; margin-bottom: 20px; }
.rm-btn-done {
  padding: 10px 28px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.rm-btn-done:hover { background: #263348; }

/* Alpine transition helpers */
[x-cloak] { display: none !important; }
