@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;800&display=swap");

:root {
  --background-colour: hsl(210deg 100% 98%);
  --text-colour: hsl(210deg 60% 18%);
  --primary-colour: hsl(306deg 58% 62%);
  --border-colour: hsl(210deg 40% 60%);
  --primary-gradient: linear-gradient(150deg, #eca951, var(--primary-colour));
  --border-style: 1px solid var(--border-colour);
  --header-height: 5rem;
}

html {
  box-sizing: border-box;
  font-family: "Manrope", sans-serif;
  font-weight: 500;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background: var(--background-colour);
  color: var(--text-colour);
}

main {
  display: flex;
  justify-content: space-between;
  min-height: calc(100vh - var(--header-height));
}

header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem;
  border-bottom: var(--border-style);
}

footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}

h1 {
  margin: 0.5rem 0;
  font-size: 2em;
  font-weight: 800;
}

h2 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.25em;
  font-weight: 500;
}

dialog[open] {
  position: fixed;
  top: 0;
  border: none;
  border-radius: 1rem;
  width: 60%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
  margin: 0;
  margin-right: 1rem;
  display: inline-block;
  user-select: none;
  background-color: var(--primary-colour);
  background-image: var(--primary-gradient);
  background-clip: text;
  -webkit-text-fill-color: rgba(0, 0, 0, 0);
  -webkit-background-clip: text;
}

button {
  display: block;
  border: 0;
  font-weight: 500;
  background-color: var(--text-colour);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 2rem;
  cursor: pointer;

  transition: box-shadow 0.3s;

  &:hover {
    box-shadow: 0 2px 6px 0px var(--text-colour);
  }

  &.gradient {
    background-color: var(--primary-colour);
    background-image: var(--primary-gradient);

    &:hover {
      box-shadow: 0 2px 6px 0px var(--primary-colour);
    }
  }
}

a {
  font-weight: 400;
  color: var(--primary-colour);
}

textarea {
  border: 0;
  padding: 3rem 1rem 1rem 1rem;
  font-size: 1rem;
  resize: none;
}

input:not([type="checkbox"]),
select {
  height: 2rem;
  font-size: 1rem;
  border: var(--border-style);
  border-radius: 0.25rem;
}

.size-input {
  width: 3rem;
}

button {
  display: inline-block;
}

.field {
  label {
    margin-right: 0.5rem;
  }
}

.panel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 10vw;

  .label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--background-colour);
    border-radius: 0.25rem;
    font-weight: 500;
    user-select: none;
  }

  textarea,
  pre {
    padding: 1rem;
    padding-top: 3rem;
  }

  textarea {
    font-family: Consolas, Monaco, monospace;
    width: 100%;
    font-size: 11pt;
    flex: 1;
    text-wrap: nowrap;
  }

  pre {
    overflow-x: auto;
    flex: 1;
  }
}

.divider {
  width: 0.25rem;
  border-right: var(--border-style);
  border-left: var(--border-style);
  display: flex;
  justify-content: center;
  align-items: center;

  &.ready:hover {
    cursor: col-resize;
  }

  &.active {
    background: var(--border-colour);
  }
}

.controls {
  display: flex;
  align-items: center;
  min-height: 3rem;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  align-self: flex-end;
}
