@import "../third-party/fonts/fonts.css";
@import "cursors.css";

:root {
  --brand-hue-metallic: 230;
  --brand-hue-blue: 230;
  --brand-hue-yellow: 35;
  --brand-hue-orange: 28;
  --brand-hue-red: 5;
  --brand-hue-green: 149;

  --brand-metallic-dark: hsl(var(--brand-hue-blue), 33%, 33%);
  --brand-metallic-medium: hsl(var(--brand-hue-metallic), 18%, 45%);
  --brand-metallic-light: hsl(var(--brand-hue-metallic), 16%, 55%);
  --brand-metallic-bright: hsl(var(--brand-hue-metallic), 18%, 65%);
  --brand-metallic-brighter: hsl(var(--brand-hue-metallic), 18%, 75%);

  --brand-sand-light: hsl(var(--brand-hue-yellow), 59%, 92%);
  --brand-creme-light: hsl(var(--brand-hue-yellow), 60%, 97%);
  --brand-background-dark: hsl(var(--brand-hue-yellow), 16%, 11%);

  --brand-orange-light: hsl(var(--brand-hue-orange), 100%, 80%);
  --brand-orange-dark: hsl(var(--brand-hue-orange), 50%, 50%);

  --brand-blue: hsl(var(--brand-hue-blue), 55%, 55%);
  --brand-blue-dark: hsl(var(--brand-hue-blue), 51%, 30%);
  --brand-blue-bright: hsl(var(--brand-hue-blue), 90%, 67%);
  --brand-blue-light: hsl(var(--brand-hue-blue), 74%, 79%);
  --brand-blue-lighter: hsl(var(--brand-hue-blue), 65%, 88%);

  --brand-red: hsl(var(--brand-hue-red), 57%, 44%);
  --brand-red-dark: hsl(var(--brand-hue-red), 72%, 29%);
  --brand-red-light: hsl(var(--brand-hue-red), 64%, 77%);
  --brand-red-bright: hsl(var(--brand-hue-red), 85%, 46%);
  --brand-red-background: hsl(var(--brand-hue-red), 54%, 95%);

  --brand-green: hsl(var(--brand-hue-green), 50%, 44%);
  --brand-green-dark: hsl(var(--brand-hue-green), 43%, 33%);
  --brand-green-light: hsl(var(--brand-hue-green), 34%, 70%);
  --brand-green-lighter: hsl(var(--brand-hue-green), 65%, 88%);
  --brand-green-bright: hsl(var(--brand-hue-green), 70%, 45%);
  --brand-green-background: hsl(var(--brand-hue-green), 54%, 95%);

  /* This is the green color that is used in the logo. It should only be
     scarcely used outside the logo, for example for brand- or marketing-related
     things. */
  --brand-logo-accent-color: #3df91e;

  --border-radius: 0.25rem;

  --z-index-bar: 1;
  --z-index-overlay: 2;
}

body {
  margin: 0;
  background: var(--brand-creme-light);
}

@media (prefers-color-scheme: dark) {
  body {
    background: var(--brand-background-dark);
  }
}

.header-bar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: var(--z-index-bar);
}

.footer-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: var(--z-index-bar);
}

html {
  font-family: "Overpass", sans-serif;
}

*:focus {
  outline: none;
}

p {
  line-height: 1.6;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

.monospace {
  font-family: "Overpass Mono", monospace;
  font-size: 0.9em;
}

img {
  object-fit: contain;
}

input[type="text"],
input[type="password"],
select {
  padding: 0.4rem;
  font-family: inherit;
  font-size: inherit;
  border: 1px solid #666;
  border-radius: var(--border-radius);
  box-shadow: inset 0 0 0.2rem 0 rgba(0, 0, 0, 0.15);
}

select {
  padding: 0.5rem;
}

input[type="text"].monospace,
input[type="password"].monospace {
  font-family: "Overpass Mono", monospace;
  /* Since the monospace font has different characteristics than the regular
     font, we need to set the height here explicitly. In the end, the input
     field needs to have the same height when placed next to a button. */
  height: 1.58rem;
}

button,
.btn {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  margin: 1rem;
  text-decoration: none;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 250ms ease-in-out, transform 150ms ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: var(--border-radius);
  border: 1px solid var(--brand-metallic-medium);
  background: var(--brand-metallic-light)
    linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
  user-select: none;
}

button:hover,
.btn:hover,
button:focus,
.btn:focus {
  background-color: var(--brand-metallic-bright);
}

button:focus,
.btn:focus {
  outline: 1px solid #fff;
  outline-offset: -4px;
}

button:active,
.btn:active {
  transform: scale(0.99);
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
}

.btn-action {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue-dark);
}

.btn-action:hover,
.btn-action:active,
.btn-action:focus {
  background-color: var(--brand-blue-bright);
}

.btn-action:disabled {
  background-color: var(--brand-blue-light);
}

.btn-success {
  background-color: var(--brand-green);
  border-color: var(--brand-green-dark);
}

.btn-success:hover,
.btn-success:active,
.btn-success:focus {
  background-color: var(--brand-green-bright);
}

.btn-success:disabled {
  background-color: var(--brand-green-light);
}

.btn-danger {
  background-color: var(--brand-red);
  border-color: var(--brand-red-dark);
}

.btn-danger:hover,
.btn-danger:active,
.btn-danger:focus {
  background-color: var(--brand-red-bright);
}

.btn-danger:disabled {
  background-color: var(--brand-red-light);
}

.btn-text {
  text-decoration: underline;
  cursor: pointer;
  color: #555;
}

.btn-external-link {
  background-image: url("/img/external-link-icon.svg");
  background-repeat: no-repeat;
  background-position: top 49% right 1.2em;
  background-size: 0.75em;
  padding-right: 2.5em;
}

.logs-output {
  /* Note: don't forget to also add the monospace class when using this class */
  padding: 0.25rem 0.5rem;
  background-color: white;
  border: 1px solid var(--brand-metallic-dark);
  border-radius: var(--border-radius);
  user-select: text;
  text-align: left;
  overflow-y: scroll;
  white-space: pre-wrap;
}

.status-bar-tooltip {
  display: none;
  position: absolute;
  bottom: 1.85em;
  background-color: var(--brand-metallic-brighter);
  color: black;
  padding: 0.2em 0.7em;
  font-size: 0.9rem;
  left: -0.6em;
  width: max-content;
  max-width: 25em;
}

.status-bar-tooltip p {
  margin-top: 0;
  margin-bottom: 0.5em;
}

.status-bar-tooltip p:last-child {
  margin-bottom: 0;
}
