.fx-font-setting {
  grid-column: 1 / -1;
  min-width: 0;
  color: #35485f;
  font-size: 12px;
}

.fx-font-setting[hidden],
.fx-font-check[hidden],
.fx-font-preview-status[hidden] {
  display: none !important;
}

.fx-font-suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 7px;
  background: #f1eefb;
}

.fx-font-suggestion > div {
  min-width: 0;
  display: grid;
  overflow-wrap: anywhere;
}

.fx-font-suggestion span,
.fx-font-setting dt {
  color: #53657a;
}

.fx-font-setting dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 3px 8px;
  margin: 6px 0 0;
}

.fx-font-setting dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.fx-font-preview-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 6px 0 0;
  padding: 6px 8px;
  background: #edf3fb;
  color: #29486d;
  border-radius: 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fx-font-preview-status[data-attention="true"],
.fx-font-check-summary[data-attention="true"] {
  background: #fff5df;
  color: #704c19;
}

.fx-font-check {
  margin-top: 10px;
  border-top: 1px solid #e3e9f0;
  padding-top: 12px;
  color: #35485f;
}

.fx-font-check h3 {
  margin: 0 0 8px;
  color: #202d3e;
  font-size: 14px;
}

.fx-font-check-body {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 7px;
  font-size: 12px;
}

.fx-font-check[data-format="ass"] .fx-font-check-body {
  height: 158px;
  height: clamp(100px, 22dvh, 158px);
  overflow: auto;
}

.fx-font-check-body p {
  margin: 0;
}

.fx-font-check-summary {
  width: 100%;
  padding: 7px 8px;
  border-radius: 7px;
  background: #edf3fb;
  font-weight: 600;
}

.fx-font-issues {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fx-font-issues li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e3e9f0;
}

.fx-font-issues li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fx-font-fallbacks ul {
  margin: 4px 0;
  padding-inline-start: 22px;
}

.fx-font-picker-trigger {
  margin: 0 0 6px;
}

.fx-workbench .fx-dialog.fx-font-picker {
  width: min(660px, calc(100vw - 28px));
}

.fx-font-picker .fx-dialog-head {
  gap: 10px;
}

.fx-font-picker-scope {
  min-width: 0;
  color: #53657a;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: end;
}

.fx-font-picker-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.fx-font-picker-tools [aria-pressed="true"] {
  border-color: #b8aedf;
  background: #f1eefb;
  color: #433285;
}

.fx-font-picker-search,
.fx-font-picker-name input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #202d3e;
  font: inherit;
}

.fx-font-picker-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 10px 0;
}

.fx-font-picker-options,
.fx-font-picker-preview {
  min-width: 0;
  padding: 9px;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.fx-font-picker-options {
  height: 232px;
  overflow: auto;
}

.fx-font-picker-options p,
.fx-font-picker-preview p {
  margin: 4px 0 8px;
  color: #53657a;
  font-size: 12px;
}

.fx-font-picker-list {
  display: grid;
  gap: 4px;
}

.fx-font-picker-option.fx-button {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 7px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  white-space: normal;
  text-align: start;
}

.fx-font-picker-option[aria-pressed="true"] {
  border-color: #aea0df;
  background: #f1eefb;
}

.fx-font-picker-option small {
  color: #4a3e85;
}

.fx-font-picker-sample {
  display: grid;
  place-items: center;
  min-height: 88px;
  max-height: 142px;
  overflow: auto;
  margin-top: 8px;
  padding: 8px;
  border-radius: 7px;
  background: #191e29;
  color: #fff;
  font: 21px/1.45 system-ui, sans-serif;
  text-align: center;
  white-space: pre-line;
}

.fx-font-picker-name {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.fx-font-picker [hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .fx-font-picker-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .fx-font-picker-options {
    height: clamp(92px, 22dvh, 162px);
  }

  .fx-font-picker .fx-dialog-body {
    overflow: auto;
  }

  .fx-font-picker input:not([type="file"]) {
    font-size: 16px;
  }
}
