/* ── Bug Report Modal ─────────────────────────────────────────────────────── */

.br-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.br-modal {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  backdrop-filter: var(--backdrop-blur);
}

.br-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.br-modal-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-full);
}

.br-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.br-close:hover {
  color: var(--color-text-full);
  background: rgba(255, 255, 255, 0.08);
}

.br-textarea {
  resize: vertical;
  min-height: 110px;
  font-family: inherit;
}

.br-url-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.br-url-note code {
  color: var(--color-text-dim);
  font-size: var(--text-xs);
}

.br-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.br-btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.br-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.br-btn--primary {
  background: var(--color-green);
  color: #0b1d12;
}

.br-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
}

.br-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-med);
}

.br-btn--secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-full);
}

.br-success {
  text-align: center;
  padding: 1rem 0;
}

.br-success p {
  color: var(--color-text-high);
  margin: 0 0 1.25rem;
  font-size: var(--text-md);
}

/* ── Report a bug header button ───────────────────────────────────────────── */

.site-header-bug-report-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: inherit;
  padding: 0.3rem 0.65rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.site-header-bug-report-btn:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text-high);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 639px) {
  .site-header-bug-report-btn {
    display: none;
  }
}

/* Screenshot upload */

.br-screenshot-section {
  margin-bottom: 16px;
}

.br-screenshot-input {
  display: none;
}

.br-screenshot-btn {
  width: 100%;
}

.br-screenshot-capturing {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 8px 0;
}

.br-screenshot-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.br-screenshot-actions {
  display: flex;
  gap: 12px;
}

.br-screenshot-preview {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--color-border-subtle);
}

.br-screenshot-remove {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.br-screenshot-remove:hover {
  color: var(--color-text-dim);
}

/* Admin panel layout */

.br-admin-container {
  flex: 1;
  min-height: 0;
}

.br-admin-id-col {
  width: 48px;
  min-width: 48px;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}

.br-admin-title {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.br-admin-screenshot-col {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  overflow: hidden;
}

/* Admin panel thumbnail */

.br-admin-thumb {
  max-height: 60px;
  max-width: 100px;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
  display: block;
}

/* Bug report detail panel */

.br-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.br-detail-panel {
  background: var(--color-card-bg);
  border-left: 1px solid var(--color-border-strong);
  color: var(--color-text-high);
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  overflow-y: auto;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.br-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.br-detail-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-high);
  line-height: 1.4;
}

.br-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.br-detail-url {
  color: var(--color-text-muted);
  text-decoration: underline;
  word-break: break-all;
  font-size: 12px;
}

.br-detail-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-dim);
}

.br-detail-description {
  font-size: 14px;
  color: var(--color-text-high);
  white-space: pre-wrap;
  line-height: 1.6;
}

.br-detail-screenshot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.br-detail-screenshot-img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--color-border-subtle);
  cursor: pointer;
}

.br-detail-screenshot-link {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: underline;
}

.br-detail-actions {
  padding-top: 0.5rem;
}

.br-detail-github-btn {
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
}
