/**
 * FilmyBazaar — Report issue modal (desktop + tablet, above detail panel)
 */
@media (min-width: 768px) {
  .fb-report-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .fb-report-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .fb-report-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .fb-report-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(90vh, 680px);
    overflow-y: auto;
    padding: 1.75rem 1.75rem 1.5rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
      linear-gradient(165deg, rgba(28, 28, 32, 0.98) 0%, rgba(12, 12, 14, 0.99) 100%);
    box-shadow:
      0 32px 80px rgba(0, 0, 0, 0.65),
      0 0 0 1px rgba(229, 9, 20, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .fb-report-modal.is-open .fb-report-panel {
    transform: translateY(0) scale(1);
  }

  .fb-report-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #b3b3b3;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .fb-report-close:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: rgba(229, 9, 20, 0.4);
    color: #fff;
  }

  .fb-report-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding-right: 2rem;
  }

  .fb-report-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.25), rgba(229, 9, 20, 0.08));
    border: 1px solid rgba(229, 9, 20, 0.35);
    color: #ff6b6b;
    font-size: 1.15rem;
  }

  .fb-report-header h2 {
    margin: 0 0 0.25rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
  }

  .fb-report-sub {
    margin: 0;
    font-size: 0.875rem;
    color: #808080;
    line-height: 1.5;
  }

  .fb-report-target {
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
  }

  .fb-report-target-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.35rem;
  }

  .fb-report-target p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
  }

  .fb-report-field {
    margin-bottom: 1.15rem;
  }

  .fb-report-label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #b3b3b3;
  }

  .fb-report-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .fb-report-chip {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #b3b3b3;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  }

  .fb-report-chip:hover {
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
  }

  .fb-report-chip.is-active {
    background: rgba(229, 9, 20, 0.18);
    border-color: rgba(229, 9, 20, 0.5);
    color: #fff;
  }

  .fb-report-field textarea {
    width: 100%;
    min-height: 110px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.55;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .fb-report-field textarea:focus {
    outline: none;
    border-color: rgba(229, 9, 20, 0.45);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
  }

  .fb-report-field textarea::placeholder {
    color: #555;
  }

  .fb-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .fb-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  }

  .fb-report-btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #b3b3b3;
  }

  .fb-report-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  .fb-report-btn--primary {
    border: none;
    background: linear-gradient(135deg, #e50914, #b8070f);
    color: #fff;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.35);
  }

  .fb-report-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(229, 9, 20, 0.45);
  }

  .fb-report-btn:disabled {
    opacity: 0.65;
    cursor: wait;
  }

  body.fb-report-open {
    overflow: hidden;
  }
}

/* Legacy modal fallback — hide old inline-styled version on desktop */
@media (min-width: 768px) {
  #reportIssueModal.modal:not(.fb-report-modal) {
    z-index: 5000 !important;
  }
}
