/* The parts of Discord's dark theme that roman-dev.com's home page and the UGC reports website share: Discord's design
   tokens (the same ones the moderation website uses), its gg sans fonts, and its buttons, inputs, badges, popouts,
   modals and loading shimmer */
@font-face {
  font-family: "gg sans";
  font-weight: 400;
  src: url("/fonts/gg-sans-400.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "gg sans";
  font-weight: 500;
  src: url("/fonts/gg-sans-500.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "gg sans";
  font-weight: 600;
  src: url("/fonts/gg-sans-600.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "gg sans";
  font-weight: 700;
  src: url("/fonts/gg-sans-700.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "gg mono";
  font-weight: 400;
  src: url("/fonts/gg-mono-400.woff2") format("woff2");
  font-display: swap;
}

:root {
  --app-frame-background: #25262a;
  --app-frame-border: #97979f1f;
  --background-base-lowest: #2c2d32;
  --background-base-lower: #323339;
  --background-base-low: #36373e;
  --background-surface-high: #393a41;
  --background-surface-higher: #3c3d45;
  --background-surface-highest: #3f4048;
  --background-mod-subtle: #97979f1f;
  --background-mod-normal: #97979f29;
  --background-mod-strong: #97979f33;
  --interactive-background-hover: #97979f1f;
  --interactive-background-active: #97979f29;
  --interactive-background-selected: #97979f33;
  --interactive-text-default: #c5c6ca;
  --interactive-text-hover: #ffffff;
  --interactive-text-active: #ffffff;
  --border-subtle: #97979f1f;
  --border-normal: #97979f33;
  --border-strong: #97979f70;
  --text-default: #f3f3f4;
  --text-subtle: #c5c6ca;
  --text-muted: #abacb2;
  --text-strong: #ffffff;
  --text-link: #76aff6;
  --text-brand: #94a8ff;
  --channels-default: #999aa1;
  --brand: #5865f2;
  --control-primary-background-default: #5865f2;
  --control-primary-background-hover: #4452bb;
  --control-primary-background-active: #3a48a3;
  --control-secondary-background-default: #97979f1f;
  --control-secondary-background-hover: #97979f29;
  --control-secondary-background-active: #97979f33;
  --control-secondary-border: #97979f0a;
  --control-border: #ffffff14;
  --input-background-default: #00000014;
  --input-border-default: #97979f33;
  --input-border-active: #5865f2;
  --input-placeholder: #a4a5ab;
  --badge-notification-background: #d22d39;
  --status-online: #23a55a;
  --status-warning: #f0b232;
  --status-danger: #f23f43;
  --feedback-info-background: #0074e314;
  --feedback-info-text: #8ebefa;
  --feedback-warning-background: #f8a30014;
  --feedback-warning-text: #fcb529;
  --feedback-critical-background: #d22d3914;
  --feedback-critical-border: #ffa39c;
  --feedback-critical-text: #ffa09b;
  --feedback-positive-background: #00854514;
  --feedback-positive-text: #7ecb94;
  --scrollbar-thin-thumb: #767780;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-high: 0 12px 32px 0 rgba(0, 0, 0, .24);
  --font-primary: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-code: "gg mono", "Source Code Pro", Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Monaco, "Courier New", Courier, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.375;
  background: var(--app-frame-background);
  color: var(--text-default);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-strong);
}

b,
strong {
  font-weight: 600;
}

/* Discord's thin scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thin-thumb) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thin-thumb);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 4px;
  min-height: 40px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}

button,
.button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Discord's buttons (secondary unless given a colour) */
button,
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 60px;
  height: 32px;
  padding: 2px 16px;
  border: 1px solid var(--control-secondary-border);
  border-radius: var(--radius-sm);
  background: var(--control-secondary-background-default);
  color: #fff;
  font-size: 14px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: background-color .15s ease-out, color .15s ease-out, border-color .15s ease-out, opacity .15s ease-out;
}

button:hover:not(:disabled),
.button:hover {
  background: var(--control-secondary-background-hover);
  text-decoration: none;
}

button:active:not(:disabled),
.button:active {
  background: var(--control-secondary-background-active);
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.primary {
  background: var(--control-primary-background-default);
  border-color: var(--control-border);
}

.primary:hover:not(:disabled) {
  background: var(--control-primary-background-hover);
}

.primary:active:not(:disabled) {
  background: var(--control-primary-background-active);
}

.button-large {
  height: 40px;
  padding: 2px 20px;
  font-size: 16px;
  line-height: 20px;
}

/* (like Discord's icon buttons: no background until hovered) */
.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--interactive-text-default);
}

.ghost:hover:not(:disabled) {
  background: var(--background-mod-normal);
  color: var(--interactive-text-hover);
}

.ghost:active:not(:disabled) {
  background: var(--background-mod-strong);
}

.icon-button {
  min-width: 0;
  width: 32px;
  padding: 0;
}

/* Discord's inputs */
input,
textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--input-border-default);
  border-radius: var(--radius-sm);
  background: var(--input-background-default);
  color: var(--text-default);
  font-size: 16px;
  outline: none;
  transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}

input:focus,
textarea:focus {
  border-color: var(--input-border-active);
  box-shadow: 0 0 0 1px var(--input-border-active);
}

input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
}

textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

label {
  display: block;
  margin: 16px 0 8px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text-strong);
}

/* icons */
.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-code);
  font-size: 13px;
}

/* the logo: a blurple squircle, like a server icon */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-strong);
  white-space: nowrap;
}

a.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  flex: none;
}

.brand-sub {
  color: var(--text-muted);
  font-weight: 500;
}

/* Discord's badges, and its feedback colours */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  background: var(--background-mod-normal);
  color: var(--text-subtle);
  white-space: nowrap;
}

.badge .icon {
  width: 13px;
  height: 13px;
}

.tone-blue {
  background: var(--feedback-info-background);
  box-shadow: inset 0 0 0 1px #8bbcf833;
  color: var(--feedback-info-text);
}

.tone-yellow {
  background: var(--feedback-warning-background);
  box-shadow: inset 0 0 0 1px #fbb32f33;
  color: var(--feedback-warning-text);
}

.tone-red {
  background: var(--feedback-critical-background);
  box-shadow: inset 0 0 0 1px #ffa39c33;
  color: var(--feedback-critical-text);
}

.tone-green {
  background: var(--feedback-positive-background);
  box-shadow: inset 0 0 0 1px #7ecb9433;
  color: var(--feedback-positive-text);
}

/* the red notification count */
.count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--badge-notification-background);
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.count:empty {
  display: none;
}

.count.quiet {
  background: var(--background-mod-strong);
  color: var(--text-subtle);
}

.label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Discord's dropdown: an input-like box with a chevron, and a popout list below it */
.dropdown {
  position: relative;
  min-width: 0;
}

.dropdown-button,
.dropdown-button:hover:not(:disabled),
.dropdown-button:active:not(:disabled) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--input-border-default);
  border-radius: var(--radius-sm);
  background: var(--input-background-default);
  color: var(--text-default);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.dropdown.open .dropdown-button {
  border-color: var(--input-border-active);
}

.dropdown-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-chevron {
  width: 18px;
  height: 18px;
  color: var(--interactive-text-default);
  transition: transform .2s ease;
}

.dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-popout {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 100%;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--background-surface-higher);
  box-shadow: var(--shadow-high);
  animation: popout-in .12s ease-out;
}

@keyframes popout-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.dropdown-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  line-height: 18px;
  color: var(--text-subtle);
  white-space: nowrap;
  cursor: pointer;
  outline: none;
}

.dropdown-option:hover,
.dropdown-option:focus-visible {
  background: var(--interactive-background-hover);
  color: var(--interactive-text-hover);
}

.dropdown-option[aria-selected="true"] {
  background: var(--interactive-background-selected);
  color: var(--interactive-text-active);
  font-weight: 500;
}

.dropdown-check {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

/* Discord's modals */
dialog.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--background-base-low);
  color: var(--text-default);
  box-shadow: var(--shadow-high);
  overflow: hidden;
}

dialog.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in .18s cubic-bezier(.2, .9, .3, 1.1);
}

dialog.modal::backdrop {
  background: rgba(0, 0, 0, .7);
  animation: fade-in .18s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(.94);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 16px 12px 24px;
}

.modal-head .grow {
  flex: 1;
  min-width: 0;
}

.modal-head h2 {
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.modal-body {
  padding: 4px 24px 20px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--background-base-lower);
}

/* loading placeholders: Discord's shimmering grey shapes */
.skeleton {
  display: block;
  height: 14px;
  margin: 6px 0;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--background-mod-subtle) 0%, var(--background-mod-strong) 40%, var(--background-mod-subtle) 80%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--background-mod-strong);
  border-top-color: var(--text-default);
  animation: spin .8s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Discord's toasts */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--background-surface-highest);
  box-shadow: var(--shadow-high);
  font-weight: 500;
  z-index: 100;
  animation: toast-in .2s ease-out;
}

.toast.bad {
  background: #3d2b30;
  border-color: #e24d50;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after,
  dialog.modal[open],
  dialog.modal::backdrop {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
