/* =========================================================
   JustReminisce – Report Modal Styling (v1.0.2)
   - Fix textarea background/contrast
   - Primary submit button = JR orange
   - Cancel button = secondary style
   - Close "X" centered
   ---------------------------------------------------------
   If this still doesn't apply, tell me the modal wrapper class/id
   from Inspect and I’ll scope it perfectly.
   ========================================================= */

/* Broad-but-still-modal-focused wrapper targets (BuddyPress/BuddyBoss/common modals) */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal,
  .bb-modal,
  .bp-modal,
  .modal-report,
  .modal--report,
  .jr-report-popup,
  .modal,
  .modal-dialog,
  .modal-content
){
  --jr-accent: #d07a52;
  --jr-accent-hover: #bf6a45;
  --jr-text: #1f2937;
  --jr-muted: #6b7280;
  --jr-border: #e6e8ee;
  --jr-input-bg: #f6f7f9;
}

/* ---------- Textarea / inputs ---------- */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(textarea, input[type="text"], input[type="search"]){
  background: var(--jr-input-bg) !important;
  color: var(--jr-text) !important;
  border: 1px solid var(--jr-border) !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  outline: none !important;
}

:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) textarea{
  min-height: 150px !important;
  resize: vertical;
}

/* Placeholder contrast */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(textarea, input)::placeholder{
  color: #8b93a1 !important;
  opacity: 1 !important;
}

/* Focus ring */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(textarea:focus, input:focus){
  border-color: var(--jr-accent) !important;
  box-shadow: 0 0 0 4px rgba(208,122,82,.18) !important;
  background: #fff !important;
}

/* ---------- Buttons base ---------- */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(button, .button, input[type="button"], input[type="submit"]){
  border-radius: 18px !important;
  padding: 14px 22px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* Primary submit (JR orange) */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  button[type="submit"],
  input[type="submit"],
  .submit-report,
  .btn-submit,
  .report-submit,
  .bb-report-submit,
  .button-primary
){
  background: var(--jr-accent) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 22px rgba(208,122,82,.25) !important;
  cursor: pointer !important;
  transition: background .15s ease, transform .06s ease, filter .15s ease;
}

:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  button[type="submit"],
  input[type="submit"],
  .submit-report,
  .btn-submit,
  .report-submit,
  .bb-report-submit,
  .button-primary
):hover{
  background: var(--jr-accent-hover) !important;
  filter: brightness(1.02);
}

:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  button[type="submit"],
  input[type="submit"],
  .submit-report,
  .btn-submit,
  .report-submit,
  .bb-report-submit,
  .button-primary
):active{
  transform: translateY(1px);
}

/* Cancel (secondary) */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  .btn-cancel,
  .cancel-report,
  .report-cancel,
  .bb-report-cancel,
  .button-secondary
){
  background: #fff !important;
  color: var(--jr-text) !important;
  border: 2px solid var(--jr-border) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.06) !important;
  cursor: pointer !important;
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
}

:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  .btn-cancel,
  .cancel-report,
  .report-cancel,
  .bb-report-cancel,
  .button-secondary
):hover{
  background: #f9fafb !important;
  border-color: #d7dbe6 !important;
}

:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  .btn-cancel,
  .cancel-report,
  .report-cancel,
  .bb-report-cancel,
  .button-secondary
):active{
  transform: translateY(1px);
}

/* If cancel has no special class and is a plain button[type="button"], style it as secondary */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) button[type="button"]{
  background: #fff !important;
  color: var(--jr-text) !important;
  border: 2px solid var(--jr-border) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.06) !important;
}

/* ---------- Close "X" alignment ---------- */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  .close,
  .close-btn,
  .modal-close,
  .report-close,
  .bp-modal-close,
  .bb-close,
  button[aria-label="Close"]
){
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 2px solid var(--jr-border) !important;
  cursor: pointer !important;
}

/* Center icon/text in close button */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  .close,
  .close-btn,
  .modal-close,
  .report-close,
  .bp-modal-close,
  .bb-close,
  button[aria-label="Close"]
) :where(svg, span, i, em){
  display: block !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: translateY(0) !important;
}

/* If close button contains a plain "×" text node, tighten typography */
:where(
  #jr-report-modal,
  .jr-report-modal,
  .report-modal,
  .report-page-modal,
  .bp-report-modal,
  .bp-reporting-modal,
  .buddypress-report-modal,
  .bb-report-modal,
  .bb-reporting-modal
) :where(
  .close,
  .close-btn,
  .modal-close,
  .report-close,
  .bp-modal-close,
  .bb-close,
  button[aria-label="Close"]
){
  font-size: 28px !important;
  font-weight: 900 !important;
  color: var(--jr-text) !important;
  line-height: 1 !important;
}
