.synthetix-dashboard {
  font-family: BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-sans;

  button.synthetix-dashboard-button {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(-50%);
    z-index: 9999;
    border: none;
    background-color: #c9269e;
    cursor: pointer;
    padding: 10px;
    margin: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.1s ease-in-out;

    img {
      width: 100px;
    }

    &:hover {
      background-color: rgba(201, 38, 158, 0.7);
    }

    &:has(~ :popover-open) {
      display: none;
    }
  }

  div.synthetix-dashboard-popover {
    :where(*) {
      font-family: inherit;
    }

    gap: 1em;
    border: 0;
    padding: 2ch;
    padding-top: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    width: 400px;
    border-radius: 1ch;
    max-width: 90vw;
    max-height: 90vh;
    flex-direction: column;

    .synthetix-dashboard-popover-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: #f2f2f2;
      min-height: 48px;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        background-color: #f2f2f2;
        height: 100%;
        width: calc(100% + 4ch);
        left: -2ch;
        z-index: -1;
      }

      h2 {
        margin: 0;
        font-weight: 700;
      }

      button {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin: 0;
        display: flex;
      }
    }

    &::backdrop {
      background-color: rgba(200, 200, 200, 0.3);
      backdrop-filter: blur(2px);
    }

    &:popover-open {
      display: flex;
      animation: synthetix-dashboard-popover-fade-in 150ms ease-in-out;
    }

    label {
      font-weight: bold;
    }

    input,
    select {
      height: 32px;
      display: block;
      width: 100%;
      padding: 0.25em 1em;
      clear: both;
      outline: none;
      background-color: #f2f2f2;
      color: inherit;
      font-family: inherit;
      font-size: inherit;
      border: 2px solid rgba(242, 242, 242, 0.7);
      border-radius: 8px;
      box-sizing: border-box;
      accent-color: #c9269e;

      &:focus {
        border-color: #c9269e;
      }
    }
  }
}

@keyframes synthetix-dashboard-popover-fade-in {
  0% {
    scale: 0.8;
    opacity: 0;
  }
  100% {
    scale: 1;
    opacity: 1;
  }
}
