Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

6.1 KB
Raw Blame
@use 'variables' as *;
@use 'toast' as *;

body {
  background: #000;
  margin: 0;
  overflow: hidden;
  text-rendering: optimizelegibility !important;
  -moz-text-rendering: optimizelegibility !important;
}

* {
  font-family: 'Lexend Deca', Inter, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  outline: none;
}

#center {
  font-size: calc(10px + 2vmin);
  text-align: center;
  position: absolute;
  inset: 0;
  text-shadow: 0 0 25px rgb(0 0 0 / 30%);
  display: grid;
  place-items: center;
  margin: 0;

  #widgets {
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    animation: fadeIn 1s;
  }

  &.no-textBorder {
    text-shadow: none !important;

    .quote {
      text-shadow: none !important;
    }
  }
}

::placeholder {
  @include themed {
    color: t($color);
  }

  opacity: 1;
}

#root {
  @include themed {
    color: t($color);
  }
}

/* accessibility */
.textBorder {
  filter: drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 #111c);
}

.no-animations {
  .ReactModal__Content,
  button,
  svg,
  input[type='text'],
  .MuiSwitch-switchBase,
  .tooltipTitle,
  .quicklinks-container img {
    transition: none !important;
  }
}

.frame {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* fonts (imported from fontsource) */
// i don't even know what the unicode-range is for, but we're keeping it so that nothing breaks
@font-face {
  font-family: 'Lexend Deca';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../../node_modules/@fontsource/lexend-deca/files/lexend-deca-latin-400-normal.woff2)
    format('woff2');
  /* stylelint-disable-next-line unit-no-unknown */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lexend Deca';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../../node_modules/@fontsource/lexend-deca/files/lexend-deca-latin-ext-400-normal.woff2)
    format('woff2');
  /* stylelint-disable-next-line unit-no-unknown */
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
   /* stylelint-disable-next-line unit-no-unknown */
  src: url(../../node_modules/@fontsource/inter/files/inter-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  /* stylelint-disable-next-line unit-no-unknown */
  src: url(../../node_modules/@fontsource/inter/files/inter-greek-400-normal.woff2) format('woff2');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  /* stylelint-disable-next-line unit-no-unknown */
  src: url(../../node_modules/@fontsource/inter/files/inter-greek-ext-400-normal.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  /* stylelint-disable-next-line unit-no-unknown */
  src: url(../../node_modules/@fontsource/inter/files/inter-vietnamese-400-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  /* stylelint-disable-next-line unit-no-unknown */
  src: url(../../node_modules/@fontsource/inter/files/inter-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* error */
.criticalError {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;

  .criticalError-actions {
    display: flex;
    flex-flow: row;
    gap: 20px;
  }

  button,
  a {
    border: 0;
    border-radius: 12px;
    padding: 10px 30px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-flow: row;
    justify-content: center;
    gap: 20px;
    transition: 0.5s;
    cursor: pointer;
    text-decoration: none;
  }
}

/* light theme critical error */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #000;
  }

  .criticalError {
    .criticalError-message {
      color: #fff;
    }

    p {
      color: rgb(255 255 255 / 75.3%);
    }

    a {
      background: #0e1013;
      box-shadow: 0 0 0 1px #484848;
      color: #fff;

      &:hover {
        background: #1e1e1e;
      }
    }
  }
}

@media (prefers-color-scheme: light) {
  body {
    background-color: #fff;
  }

  .criticalError {
    .criticalError-message {
      color: #000;
    }

    p {
      color: rgb(0 0 0 / 75.3%);
    }

    a {
      background: #fdfdfd;
      box-shadow: 0 0 0 1px #484848;
      color: #000;

      &:hover {
        background: #f5f5f5;
      }
    }
  }
}

// credit to Kendrick Arnett https://codepen.io/kendrick/pen/WxNwdE
.light {
  .pulse {
    height: 100%;
    width: 100%;
    background: linear-gradient(-90deg, #efefef 0%, #ccc 50%, #efefef 100%);
    background-size: 400% 400%;
    animation: pulse 0.8s ease-in-out infinite;

    @keyframes pulse {
      0% {
        background-position: 0% 0%;
      }

      100% {
        background-position: -135% 0%;
      }
    }
  }
}

.dark {
  .pulse {
    height: 100%;
    width: 100%;
    background: linear-gradient(-90deg, #000 0%, rgb(83 83 83) 50%, #000 100%);
    background-size: 400% 400%;
    animation: pulse 0.8s ease-in-out infinite;

    @keyframes pulse {
      0% {
        background-position: 0% 0%;
      }

      100% {
        background-position: -135% 0%;
      }
    }
  }
}