Skip to content

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.

7.9 KB
Raw Blame
.AppError {
  display: flex;
  flex-direction: column;
  color: var(--text-default);
  text-align: start;
}

/* Page variant lives inside main.content: fill it, but never the viewport. */
.AppError--page {
  flex: 1;
  min-height: 100%;
  padding: var(--space-xl-fixed);
  overflow-y: auto;
  container-type: inline-size;
}

/* Shell variant is the whole window: the app shell could not render. */
.AppError--shell {
  height: 100vh;
  min-height: 100vh;
  padding: var(--space-xl-fixed);
  overflow-y: auto;
  background: var(--gradient-body-background, var(--body-background));
  container-type: inline-size;
}

/* Inline variant replaces a block inside a page, such as the install action. */
.AppError--inline {
  width: 100%;
  min-width: 0;
}

.AppError__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg-fixed);
  margin-block: auto;
  margin-inline: auto;
  height: fit-content;
}

.AppError--page .AppError__panel {
  width: min(100%, 44rem);
}

.AppError--shell .AppError__panel {
  width: min(100%, 56rem);
}

.AppError--inline .AppError__panel {
  width: 100%;
  margin: 0;
}

.AppError__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md-fixed);
}

.AppError__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm-fixed);
  border-radius: var(--radius-sm);
  color: var(--danger);
  background: color-mix(in oklab, var(--danger) 14%, transparent);
}

.AppError__heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.AppError__title {
  margin: 0;
  font-size: var(--title-lg);
}

.AppError--inline .AppError__title {
  font-size: var(--title-md, var(--title-lg));
}

.AppError__title:focus {
  outline: none;
}

.AppError__subtitle {
  margin: var(--space-xs-fixed) 0 0;
  color: var(--text-secondary);
  font-size: var(--body-md);
  line-height: var(--leading-normal);
}

.AppError__context {
  display: grid;
  gap: var(--space-2xs-fixed);
  margin: 0;
  padding: var(--space-sm-fixed) var(--space-md-fixed);
  border: 1px solid color-mix(in oklab, var(--text-default) 16%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--text-default) 4%, transparent);
}

.AppError__contextRow {
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) minmax(0, 1fr);
  gap: var(--space-sm-fixed);
}

.AppError__contextRow dt {
  color: var(--text-secondary);
  font-size: var(--body-sm);
}

.AppError__contextRow dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  user-select: text;
}

.AppError__error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs-fixed);
  min-width: 0;
}

.AppError__error .Badge {
  max-width: 100%;
}

.AppError__message {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: monospace;
  font-size: var(--body-md);
  line-height: var(--leading-normal);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.AppError__message.is-expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.AppError__show-full {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: var(--body-sm);
  text-decoration: underline;
}

.AppError__show-full:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.AppError__caption {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--body-sm);
}

.AppError__details {
  padding: var(--space-sm-fixed) var(--space-md-fixed);
  border: 1px solid color-mix(in oklab, var(--text-default) 16%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--text-default) 4%, transparent);
}

.AppError__details summary {
  cursor: pointer;
  font-size: var(--body-sm);
  font-weight: var(--semibold);
}

.AppError__stack {
  max-height: 18rem;
  margin: var(--space-sm-fixed) 0 0;
  overflow: auto;
  font-family: monospace;
  font-size: var(--body-sm);
  line-height: var(--leading-normal);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
}

.AppError__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs-fixed);
}

.AppError__actions .Button {
  max-width: 100%;
}

.AppError__actions .Button[aria-disabled='true'] {
  opacity: 0.65;
  cursor: progress;
}

.AppError__actions .Button__label {
  white-space: normal;
  overflow-wrap: anywhere;
}

.AppError__menu {
  position: relative;
  margin-inline-start: auto;
}

.AppError__menuTrigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-default);
  cursor: pointer;
}

.AppError__menuTrigger:hover:not(:disabled) {
  background: color-mix(in oklab, var(--text-default) 8%, transparent);
}

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

.AppError__menuTrigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.AppError__menuPanel {
  position: absolute;
  inset-block-start: calc(100% + var(--space-2xs-fixed));
  inset-inline-end: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 13rem;
  padding: var(--space-2xs-fixed);
  border: 1px solid
    var(--divider, color-mix(in oklab, var(--text-default) 16%, transparent));
  border-radius: var(--radius-sm);
  background: var(--panel-background, var(--modal-background));
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.35));
}

.AppError__menuItem {
  display: flex;
  align-items: center;
  gap: var(--space-xs-fixed);
  width: 100%;
  padding: var(--space-xs-fixed) var(--space-sm-fixed);
  border: none;
  border-radius: var(--radius-xs);
  background: none;
  color: var(--text-default);
  cursor: pointer;
  font: inherit;
  text-align: start;
  white-space: nowrap;
}

.AppError__menuItem:hover,
.AppError__menuItem:focus-visible {
  background: color-mix(in oklab, var(--text-default) 10%, transparent);
  outline: none;
}

.AppError__menuItem.is-separated {
  margin-block-start: var(--space-2xs-fixed);
  border-block-start: 1px solid
    var(--divider, color-mix(in oklab, var(--text-default) 16%, transparent));
  border-start-start-radius: 0;
  border-start-end-radius: 0;
}

.AppError__menuItem.is-danger {
  color: var(--danger);
}

.AppError__menuItem.is-danger:hover,
.AppError__menuItem.is-danger:focus-visible {
  background: color-mix(in oklab, var(--danger) 12%, transparent);
}

.AppError__feedback {
  min-height: 1.4em;
}

.AppError__feedback-message {
  margin: 0;
  font-size: var(--body-sm);
}

.AppError__feedback-message.is-success {
  color: var(--success);
}

.AppError__feedback-message.is-error {
  color: var(--danger);
}

body.high-contrast .AppError__icon {
  background: transparent;
  border: 1px solid var(--danger);
}

/* Narrow content area: stack the header and let actions wrap cleanly. */
@container (max-width: 38rem) {
  .AppError--page .AppError__header {
    flex-direction: column;
  }

  .AppError--page .AppError__icon svg {
    width: 18px;
    height: 18px;
  }

  .AppError--page .AppError__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .AppError--page .AppError__actions .Button {
    width: 100%;
  }

  .AppError--page .AppError__menu {
    align-self: flex-end;
    margin-inline-start: 0;
  }
}

@media (max-width: 640px) {
  .AppError--page,
  .AppError--shell {
    padding: var(--space-md-fixed);
  }

  .AppError__header {
    flex-direction: column;
  }

  .AppError__icon svg {
    width: 18px;
    height: 18px;
  }

  .AppError__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .AppError__actions .Button {
    width: 100%;
  }

  .AppError__menu {
    align-self: flex-end;
    margin-inline-start: 0;
  }
}

/* Directional icons point the other way in RTL. */
.isRTL .AppError__mirror {
  transform: scaleX(-1);
}