@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500&display=swap');

:root {
  --content-padding-top: 25px;
  --content-padding-bottom: 15px;
  --content-padding-right: 20px;
  --content-padding-left: max(
    env(safe-area-inset-left),
    var(--content-padding-right)
  );
}

.react-icons {
  vertical-align: middle;
}

w3m-modal {
  z-index: 2000;
}

.accountTitle {
  display: flex;
}

input:read-only {
  background-color: hsla(0, 0%, 0%, 0.04);
  cursor: not-allowed;
}

.loader {
  position: absolute !important;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto !important;
  height: 42px;
}

section.ant-layout {
  align-items: center;
}

header {
  width: 100vw;
  padding: 0;
  margin: 0;
}

header.testnet,
header.testnet > .ant-menu {
  background-color: #2D1640;
}

header.local,
header.local > .ant-menu {
  background-color: #4B0000;
}

main {
  padding-top: var(--content-padding-top);
  padding-right: var(--content-padding-right);
  padding-bottom: var(--content-padding-bottom);
  padding-left: var(--content-padding-left);
  margin: 0;
}

@media screen and (min-width: 1600px) {
  main {
    width: 1600px;
  }
}

@media (max-width: 1599px), not screen {
  main {
    width: 100vw;
  }
}

.logo {
  height: 38px;
  margin-top: -2px;
}

.search-box {
  margin-bottom: 20px;
}

.header-column-logo {
  width: 56px;
  float: left;
}

.header-column-search {
  margin-left: 56px;
}

.ant-layout-header {
  padding: 0 20px;
}

.ant-descriptions {
  margin-bottom: 25px;
}

.ant-descriptions-view {
  overflow: auto;
}

.ant-descriptions-item-label {
  text-align: left;
}

.ant-descriptions-item-content {
  background: #fff;
}

.stats .react-icons {
  margin-right: 0;
  color: #1890ff;
  font-size: 24px;
  margin-bottom: 5px;
}

.stats .react-icons.react-icons-entries {
  margin-left: -2px;
}

.stats h3.ant-typography {
  font-weight: normal !important;
  margin-bottom: 0 !important;
  margin-top: 4px;
}

.stats h4.ant-typography {
  margin-bottom: 0 !important;
  margin-top: 4px;
}

.stats .code {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace;
}

.stats .ant-card-body {
  padding: 18px 24px 16px;
  color: rgba(0, 0, 0, 0.45);
  min-height: 121px;
}

.stats.stats-minheight145 .ant-card-body {
  min-height: 145px;
}

.stats small {
  color: rgba(0, 0, 0, 0.25);
}

.stats .ant-skeleton-content .ant-skeleton-title {
  width: 75%;
  margin-bottom: 0;
}

.stats .ant-carousel {
  margin-bottom: 16px;
}

.stats .ant-carousel .ant-skeleton-content .ant-skeleton-title {
  width: 50%;
}

.stats .ant-carousel .slick-dots {
  margin: 0;
  display: inline-block;
  right: 20px;
  left: auto;
  bottom: 20px;
}

.stats .ant-carousel .slick-dots li button {
  background: #1890ff;
}

.stats .ant-carousel .slick-dots li.slick-active button {
  background: #1890ff;
}

.stats .social {
  margin-top: 8px;
}

.stats .ant-tag {
  margin-bottom: 6px;
}

.stats .react-icons-social {
  margin-left: -1px;
  margin-right: 3px;
  margin-top: -2px;
  vertical-align: middle;
}

.stats .ant-skeleton-title {
  margin-top: 8px;
}

.skeleton-holder {
  background: #fff;
  padding: 12px;
  border-color: #f0f0f0;
  margin-bottom: 25px;
}

.web3-actions {
  margin-left: 10px;
}

.ant-dropdown-menu-title-content > .ant-btn-link {
  padding: 0;
}

h2.ant-typography,
h4.ant-typography:not(.ant-typography-secondary) {
  color: #000 !important;
}

h4.ant-typography {
  margin-bottom: 15px !important;
  word-break: break-all;
}

h4.ant-typography-secondary {
  margin-bottom: 20px !important;
}

h4.ant-typography .react-icons {
  margin-right: 6px;
  color: #1890ff;
  margin-top: -3px;
}

h4.ant-typography .react-icons-tooltip {
  margin-left: 6px;
  color: rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  font-size: 75%;
}

h4.ant-typography .react-icons.react-icons-eblocks {
  margin-right: 8px;
}

h1.ant-typography .count,
.ant-typography .count,
h4.ant-typography .count {
  background: rgba(255, 255, 255, 0.85);
  color: rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
  display: inline-block;
  vertical-align: middle;
  margin-top: -3px;
  margin-left: 12px;
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace;
  font-weight: normal;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 14px;
  border-radius: 5px;
}

.ant-list .ant-list-item {
  background: #fff;
  padding: 16px !important;
}

.ant-list .ant-list-item pre,
.entry-content .ant-tabs-top-content > .ant-tabs-tabpane pre,
.entry-content .ant-tabs-top-content > .ant-tabs-tabpane .content,
.anchor-info .ant-tabs-top-content > .ant-tabs-tabpane pre,
.anchor-info .ant-tabs-top-content > .ant-tabs-tabpane .content {
  margin: 0;
  width: 100%;
  box-shadow: 0 0 0 1px #f0f0f0 !important;
  background: #fcfcfc !important;
  padding: 7px;
}

.ant-list .ant-list-item code,
.entry-content .ant-tabs-top-content > .ant-tabs-tabpane code,
.anchor-info .ant-tabs-top-content > .ant-tabs-tabpane code {
  margin: 0;
  width: 100%;
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace !important;
}

.ant-typography.code {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace !important;
}

.ant-descriptions .ant-descriptions-item-content .ant-typography:last-child {
  margin-bottom: 0;
}

.ant-table {
  font-family: 'IBM Plex Sans', 'Helvetica', 'Tahoma', 'Arial', sans-serif;
  border: 1px solid #f0f0f0;
}

.ant-table th.filter-extid .ant-table-filter-trigger-container {
  right: auto;
  left: 110px;
}

.ant-table th.filter-entryhash .ant-table-filter-trigger-container {
  right: auto;
  left: 100px;
}

.ant-table th.filter-paying-address .ant-table-filter-trigger-container {
  right: auto;
  left: 129px;
}

.ant-table .ant-table-expanded-row-fixed {
  width: auto !important;
}

.ant-table .ant-table-thead th {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 13px;
}

.ant-table .ant-table-row .code,
.ant-descriptions .code {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace;
}

.ant-table .ant-table-row .react-icons,
.ant-descriptions .react-icons,
.ant-list .react-icons,
.heights .react-icons {
  margin-right: 5px;
  opacity: 0.5;
  margin-top: -2px;
}

.ant-table .ant-table-footer {
  background: #fff;
  padding: 12px;
}

.ant-table .ant-table-row .ant-progress-show-info .ant-progress-outer {
  margin-right: calc(-2em - 28px);
  padding-right: calc(2em + 28px);
}

.ant-list .react-icons,
.featured .react-icons {
  margin-top: -2px;
}

.ant-list.ant-list-bordered {
  border: 1px solid #f0f0f0;
}

.ant-list div.ant-typography:last-child,
.ant-table-cell div.ant-typography:last-child {
  margin-bottom: 0;
}

.ant-list .ant-list-item {
  overflow-x: auto;
}

.inline-tip {
  color: #52c41a;
}

.ant-layout-footer p {
  margin-bottom: 4px;
}

.ant-layout-footer {
  display: flex;
  align-items: center;
  flex-flow: column;
}

.extid {
  width: auto !important;
  display: block !important;
}

.ant-table .extid {
  float: left !important;
  margin-right: 15px !important;
}

.extids {
  margin-bottom: 30px;
}

.extids .extid {
  margin-bottom: 10px;
}

.extid .ant-typography {
  line-height: 18px;
  padding: 7px 11px 6px;
}

.extids .extid-ASCII .ant-typography,
.extids .extid-empty {
  padding-top: 6px !important;
  padding-bottom: 7px !important;
}

.extid .ant-select {
  width: 89px !important;
}

.extid .ant-select .ant-select-selector {
  height: 33px !important;
}

.extid-json {
  padding: 0 !important;
}

.extid-json pre {
  margin: 0;
  border: none;
  border-radius: 0;
  background: none !important;
}

.extid .extid-text,
.extid .extid-type {
  font-size: 13px !important;
}

.extids .extid-text {
  max-width: -moz-calc(100% - 89px);
  max-width: -webkit-calc(100% - 89px);
  max-width: calc(100% - 89px);
}

.extid.extid-Base64 .extid-text:not(.extid-empty),
.extid.extid-Hex .extid-text:not(.extid-empty) {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace !important;
}

.extid .extid-text {
  background: #fff;
  border-style: solid;
  border-width: 1px;
  border-color: #d9d9d9;
  word-break: break-all;
  overflow: hidden;
}

.ant-table .extid .extid-text {
  border-left-width: 0 !important;
}

.extid .extid-type.ant-typography,
.extid .extid-type .ant-select-selector,
.type-radio .ant-radio-button-wrapper-checked.type-ASCII,
.type-radio .ant-radio-button-wrapper-checked.type-ASCII:hover,
.type-radio
  .ant-radio-button-wrapper-checked.type-ASCII:not(
    .ant-radio-button-wrapper-disabled
  )::before {
  background: #001529 !important;
  border: 1px solid #001529 !important;
  color: #fff !important;
}

.extid-Base64 .extid-type.ant-typography,
.extid-Base64 .extid-type .ant-select-selector,
.extid-Hex .extid-type.ant-typography,
.extid-Hex .extid-type .ant-select-selector,
.type-radio .ant-radio-button-wrapper-checked.type-Base64,
.type-radio .ant-radio-button-wrapper-checked.type-Hex,
.type-radio .ant-radio-button-wrapper-checked.type-JSON,
.type-radio .ant-radio-button-wrapper-checked.type-Base64:hover,
.type-radio .ant-radio-button-wrapper-checked.type-Hex:hover,
.type-radio .ant-radio-button-wrapper-checked.type-JSON:hover,
.type-radio
  .ant-radio-button-wrapper-checked.type-Base64:not(
    .ant-radio-button-wrapper-disabled
  )::before,
.type-radio
  .ant-radio-button-wrapper-checked.type-Hex:not(
    .ant-radio-button-wrapper-disabled
  )::before,
.type-radio
  .ant-radio-button-wrapper-checked.type-JSON:not(
    .ant-radio-button-wrapper-disabled
  )::before {
  background: #1a7eea !important;
  border-color: #1a7eea !important;
}

.extid.extid-compact .extid-type {
  cursor: pointer;
}

.key .ant-typography {
  line-height: 14px;
  padding: 5px 11px 6px;
}

.key .key-type {
  font-size: 12px !important;
}

.key .key-text {
  font-size: 13px !important;
}

.key .key-type.ant-typography,
.key .key-type .ant-select-selector,
.type-radio .ant-radio-button-wrapper-checked.type-ASCII,
.type-radio .ant-radio-button-wrapper-checked.type-ASCII:hover,
.type-radio
  .ant-radio-button-wrapper-checked.type-ASCII:not(
    .ant-radio-button-wrapper-disabled
  )::before {
  background: #e6f7ff !important;
  border: 1px solid #91d5ff !important;
  color: #096dd9 !important;
}

.key .key-type .ant-select-arrow {
  color: #096dd9 !important;
  font-size: 8px !important;
  margin-top: -5px;
}

.key .key-type .ant-select-selection-item {
  padding-right: 18px !important;
}

.key .key-text {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace !important;
  background: #fff;
  word-break: break-all;
  overflow: hidden;
}

.ant-table .key .key-text {
  border-left-width: 0 !important;
}

.type-radio .ant-radio-button-wrapper:hover {
  color: rgba(0, 0, 0, 0.65) !important;
}

.type-radio .ant-radio-button-wrapper-checked:hover {
  color: #ffffff !important;
}

.extid .ant-select-arrow {
  color: rgba(255, 255, 255, 0.5) !important;
}

.extid-tag {
  margin-top: 5px !important;
  margin-right: 0 !important;
}

.extid .extid-text .ant-typography-copy {
  opacity: 0.5;
}

.entry-content .ant-tabs-bar,
.anchor-info .ant-tabs-bar {
  display: none !important;
}

.entry-content {
  padding: 16px !important;
  background: #fff !important;
}

.entry-content pre {
  margin-bottom: 0;
}

.anchor-info .ant-tabs {
  padding: 1px !important;
  background: #fff !important;
}

.entry-content .ant-tabs-top-content.ant-tabs-content-animated,
.entry-content .ant-tabs-bottom-content.ant-tabs-content-animated,
.anchor-info .ant-tabs-top-content.ant-tabs-content-animated,
.anchor-info .ant-tabs-bottom-content.ant-tabs-content-animated {
  transition: none !important;
}

.entry-content .code,
.anchor-info .code {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace;
}

.ant-menu .ant-menu-item .react-icons {
  margin-right: 8px;
  margin-top: -2px;
}

.ant-menu .ant-menu-item .react-icons-end {
  margin-right: 0;
  margin-left: 4px;
  margin-top: -4px;
}

.ant-menu .ant-menu-item-icon {
  margin-top: -5px;
}

.ant-menu .ant-menu-item .react-icons.react-icons-chains {
  margin-right: 7px;
}

.ant-menu .ant-menu-item .nav-text,
.ant-menu .ant-menu-submenu-title {
  text-transform: uppercase;
}

.menu-right {
  display: none !important;
  position: absolute !important;
  top: 16px;
  right: 22px;
  line-height: normal;
}

@media only screen and (min-width: 600px) {
  .menu-right {
    display: flex !important;
  }
}

.network-badge {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  padding-left: 12px !important;
  padding-right: 10px !important;
}

.network-badge .anticon-down {
  color: rgba(255, 255, 255, 0.5) !important;
}

.network-badge .ant-badge-status-text {
  color: #fff;
}

.network-badge .ant-badge-status-dot {
  width: 8px;
  height: 8px;
}

.network-badge .ant-badge-status-success::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #52c41a;
  border-radius: 50%;
  -webkit-animation: antStatusProcessing 1.2s infinite ease-in-out;
  animation: antStatusProcessing 1.2s infinite ease-in-out;
  content: '';
}

.featured {
  background: #e6f7ff;
  padding: 10px 20px;
  border: 1px solid #91d5ff;
  border-left: 5px solid #91d5ff;
}

.featured .react-icons {
  margin-left: 2px;
}

.ant-tag .react-icons {
  margin-top: -2px;
  margin-right: 3px;
}

.ant-table .align-top,
.ant-descriptions .align-top {
  vertical-align: top;
}

.ant-table .no-break {
  word-break: keep-all;
}

.formatted-balance {
  font-size: 12px;
  color: #8c8c8c;
}

.ant-skeleton.skeleton-singleline .ant-skeleton-title {
  margin: 0 !important;
}

.subsignature {
  padding-left: 20px;
  margin-left: 6px;
  margin-top: 10px;
  border-color: #d9d9d9;
  border-style: dashed;
  border-width: 0 0 0 1px;
}

.staking-card .ant-card-body {
  padding: 5px 24px 20px 24px;
}

.staking-progress .ant-progress-text {
  font-size: 12px;
  color: #8c8c8c;
}

.staking-card .react-icons {
  margin-top: -2px;
  margin-left: 3px;
  margin-right: 4px;
}

.name-tag {
  margin-top: 5px;
  margin-bottom: 5px;
}

.ant-rate.acc-fav {
  margin: 0 !important;
}

.ant-rate.acc-fav li {
  margin: 0 10px 0 0 !important;
  padding: 0 !important;
}

.ant-rate.acc-fav .ant-rate-star-zero .ant-rate-star-second,
.ant-rate.acc-fav .ant-rate-star-focused .ant-rate-star-second {
  color: rgba(24, 144, 255, 0.4);
}

.ant-rate.acc-fav .ant-rate-star-full .ant-rate-star-second {
  color: #1890ff;
}

.ant-descriptions-item-content.has-list .ant-list-item {
  padding: 0 0 10px 0 !important;
}

.ant-descriptions-item-content.has-list .ant-list-item:last-child {
  padding-bottom: 0 !important;
}

header.web3 {
  padding: 0;
  height: unset;
  line-height: unset;
}

.web3-module {
  background: #d6e4ff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  flex-flow: column;
}

.web3-register-book {
  display: flex;
  align-items: center;
}

.web3-module > .account {
  padding: 0;
  padding-right: var(--content-padding-right);
  padding-left: var(--content-padding-left);
}

@media screen and (min-width: 1600px) {
  .web3-module > .account {
    width: 1600px;
  }
}

@media (max-width: 1599px), not screen {
  .web3-module > .account {
    width: 100vw;
  }
}

.web3-logout-button:not(:hover) {
  color: white;
}

.web3-module.connected {
  padding-top: 2px;
  background: #ffffff;
}

.web3-module .react-icons {
  margin-right: 5px;
  margin-top: -3px;
}

.web3-module .react-icons.react-icons-only-icon {
  margin-right: 0;
}

.web3-module .react-icons.react-icons-end {
  margin-right: 1px !important;
  margin-left: 2px;
}

.web3-module .react-icons.react-icons-blue {
  color: #1890ff;
}

.web3-module .ant-typography {
  margin-bottom: 0 !important;
}

.web3-module .account .account-connected {
  margin-bottom: 10px;
}

.web3-module .account .ant-btn {
  margin-top: 8px;
  margin-right: 8px;
}

.web3-module .account .card-container {
  width: 100%;
}

.web3-module .account .card-container .react-icons {
  opacity: 0.5;
  margin-top: -1px;
  margin-right: 4px;
}

.web3-module .account .card-container .ant-btn .react-icons {
  opacity: 0.75;
  margin-top: -2px;
}

.web3-module .account .card-container .ant-tabs-nav .react-icons {
  margin-top: -2px;
  margin-left: -2px;
}

.web3-module .account .card-container h5 {
  font-size: 14px;
}

.web3-module .account .card-container h5.ant-typography .react-icons {
  margin-left: 3px;
  margin-top: -2px;
}

.web3-module .account .card-container .ant-tabs-nav {
  margin: 0;
}

.web3-module .account .card-container .ant-tabs-content-holder {
  background: #ffffff;
  padding: 12px 15px;
}

.web3-module .account .card-container .ant-tabs-nav .ant-badge {
  margin-top: -3px;
  margin-left: 5px;
}

.web3-module
  .account
  .card-container
  .ant-tabs-nav
  .ant-badge
  .ant-badge-count {
  background: #8c8c8c;
}

.web3-module
  .account
  .card-container
  .ant-tabs-nav
  .ant-tabs-tab-active
  .ant-badge
  .ant-badge-count {
  background: #1890ff;
}

.web3-module .account .card-container .ant-alert ul {
  margin-bottom: 0;
}

.web3-module .account .card-container .ant-alert .react-icons {
  opacity: 1;
  margin-top: -3px;
}

.web3-module .account .card-container .ant-divider {
  border: 0;
  margin: 5px 0;
}

.web3-module .account .card-container .code {
  font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, 'Courier New',
    monospace;
}

.ant-modal-content .ant-divider {
  border: 0;
  margin: 5px 0;
}

.ant-modal-content .ant-form .ant-form-item:last-child {
  margin-bottom: 0;
}

.ant-modal-content
  .ant-form
  .ant-form-item.text-row
  .ant-form-item-control-input {
  min-height: auto;
}

.ant-modal-content .ant-form .ant-form-item .ant-form-item-label {
  font-weight: bold;
}

.ant-table-row.node-details.node-error {
  background-color: hsl(8, 100%, 97%);
}

.ant-table-row.node-details.node-error
  + .ant-table-expanded-row
  > .ant-table-cell {
  background-color: hsl(8, 100%, 95%);
}

.ant-table-row.node-details.node-error:hover,
.ant-table-row.node-details.node-error:hover > .ant-table-cell {
  background-color: hsl(8, 100%, 95%);
}

.node-details .node-error-icon {
  color: #ff4d4f;
}

.info-table .ant-descriptions-item-label {
  width: 20em;
}

.compact-list .ant-list-item {
  padding: 0px !important;
}

.validator-signatures .ant-list-item {
  padding: 8px 16px !important;
}

/* ===== Dark mode overrides =====
 * antd v5's ConfigProvider handles most components. These rules neutralise
 * the hardcoded light colors in this file so they don't fight dark mode.
 */

[data-theme='dark'] input:read-only {
  background-color: hsla(0, 0%, 100%, 0.06);
}

[data-theme='dark'] h2.ant-typography,
[data-theme='dark']
  h4.ant-typography:not(.ant-typography-secondary) {
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme='dark'] .anchor-info .ant-tabs-top-content > .ant-tabs-tabpane .content {
  background: #1f1f1f !important;
  box-shadow: 0 0 0 1px #303030 !important;
}

[data-theme='dark'] .entry-content,
[data-theme='dark'] .anchor-info .ant-tabs {
  background: #141414 !important;
}

[data-theme='dark'] .ant-table-row.node-details.node-error,
[data-theme='dark']
  .ant-table-row.node-details.node-error
  + .ant-table-expanded-row
  > .ant-table-cell,
[data-theme='dark'] .ant-table-row.node-details.node-error:hover,
[data-theme='dark']
  .ant-table-row.node-details.node-error:hover
  > .ant-table-cell {
  background-color: hsl(8, 30%, 18%);
}

/* Every place the CSS explicitly paints a white background on an antd
 * surface. In light mode these match the default; in dark mode they were
 * leaving white panels inside a dark app. */

[data-theme='dark'] .ant-descriptions-item-content,
[data-theme='dark'] .skeleton-holder,
[data-theme='dark'] .ant-list .ant-list-item,
[data-theme='dark'] .ant-table .ant-table-footer,
[data-theme='dark'] .extid .extid-text,
[data-theme='dark'] .key .key-text {
  background: #141414;
}

/* These hardcode black-ish text colors that become invisible on dark
 * surfaces. Swap for antd's dark-mode defaults. */

[data-theme='dark'] .ant-typography-secondary,
[data-theme='dark'] .ant-typography.secondary {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Header brand colors stay dark regardless of theme — they're the brand. */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
}

html[data-theme='dark'] body {
  background: #000;
  color: rgba(255, 255, 255, 0.85);
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}
