.app-shell-root {
  --issue-reporter-gutter: calc(12rem + env(safe-area-inset-right, 0px));
}

.app-shell-root.issue-reporting-enabled .route-page-wrap {
  padding-inline-end: var(--issue-reporter-gutter);
}

.app-shell-root:dir(rtl) {
  --issue-reporter-gutter: calc(12rem + env(safe-area-inset-left, 0px));
}

.issue-reporter {
  position: fixed;
  z-index: 55;
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
}

.issue-reporter:dir(rtl) {
  inset-inline-end: max(1rem, env(safe-area-inset-left));
}

.issue-reporter__trigger {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(122, 224, 190, 0.34);
  border-radius: 999px;
  background: rgba(14, 28, 36, 0.94);
  padding: 0.65rem 0.9rem;
  color: #eefcf7;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.issue-reporter__trigger > span:first-child {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  background: #7ae0be;
  color: #081510;
  font-size: 0.78rem;
}

.issue-reporter__dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(46rem, calc(100dvh - 2rem));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  background: #111f28;
  padding: 0;
  color: #f5fbf9;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.issue-reporter__dialog::backdrop { background: rgba(4, 9, 12, 0.72); backdrop-filter: blur(5px); }
.issue-reporter__content { max-height: inherit; overflow-y: auto; padding: 1.25rem; overflow-wrap: anywhere; }
.issue-reporter__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.issue-reporter__eyebrow { margin: 0 0 0.2rem; color: #7ae0be; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.issue-reporter__title { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.issue-reporter__close { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.8rem; background: rgba(255, 255, 255, 0.04); color: #fff; font-size: 1.4rem; }
.issue-reporter__label { display: block; margin-top: 1.15rem; font-size: 0.86rem; font-weight: 750; }
.issue-reporter__textarea { width: 100%; min-height: 7.5rem; margin-top: 0.45rem; resize: vertical; }
.issue-reporter__preview { margin: 1rem 0 0; overflow: hidden; border-radius: 0.9rem; background: #091218; }
.issue-reporter__preview img { display: block; width: 100%; max-height: 14rem; object-fit: contain; }
.issue-reporter__preview figcaption { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0.8rem; color: #c7d8d3; font-size: 0.78rem; }
.issue-reporter__remove { border: 0; background: transparent; color: #f5aaa4; font-weight: 750; white-space: nowrap; }
.issue-reporter__notice, .issue-reporter__privacy, .issue-reporter__context { margin: 0.85rem 0 0; color: #b9cbc6; font-size: 0.78rem; line-height: 1.55; }
.issue-reporter__notice { border-inline-start: 3px solid #d8ae6f; padding-inline-start: 0.7rem; color: #ead6b7; }
.issue-reporter__context span { color: #7ae0be; font-weight: 700; }
.issue-reporter__error { margin: 0.8rem 0 0; color: #ffb5ae; font-size: 0.82rem; font-weight: 650; }
.issue-reporter__actions { display: flex; justify-content: flex-end; gap: 0.65rem; margin-top: 1rem; }
.issue-reporter__primary, .issue-reporter__secondary { min-height: 2.75rem; border-radius: 0.8rem; padding: 0.65rem 1rem; font-weight: 750; white-space: nowrap; }
.issue-reporter__primary { border: 1px solid #7ae0be; background: #7ae0be; color: #07130f; }
.issue-reporter__secondary { border: 1px solid rgba(255, 255, 255, 0.13); background: rgba(255, 255, 255, 0.05); color: #f4f8f7; }
.issue-reporter__success { display: grid; justify-items: center; gap: 0.75rem; padding: 2rem 0.5rem 0.75rem; text-align: center; }
.issue-reporter__success strong { font-size: 1.15rem; }
.issue-reporter__receipt { max-width: 100%; direction: ltr; color: #a9c1ba; font-family: ui-monospace, monospace; font-size: 0.78rem; }

@media (max-width: 640px) {
  .app-shell-root { --issue-reporter-gutter: calc(4rem + env(safe-area-inset-right, 0px)); }
  .app-shell-root:dir(rtl) { --issue-reporter-gutter: calc(4rem + env(safe-area-inset-left, 0px)); }
  .issue-reporter { inset-inline-end: max(0.75rem, env(safe-area-inset-right)); bottom: max(4.75rem, env(safe-area-inset-bottom)); }
  .issue-reporter:dir(rtl) { inset-inline-end: max(0.75rem, env(safe-area-inset-left)); }
  .issue-reporter__trigger > span:last-child { display: none; }
  .issue-reporter__trigger { width: 3rem; height: 3rem; justify-content: center; padding: 0; }
  .issue-reporter__dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .issue-reporter__content { padding: 1rem; }
  .issue-reporter__actions { flex-direction: column-reverse; }
  .issue-reporter__primary, .issue-reporter__secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .issue-reporter__dialog::backdrop { backdrop-filter: none; }
}
