/* Copyright 2024 Google LLC
SPDX-License-Identifier: Apache-2.0 */

:root {
  --primary-color: rgb(0, 153, 255);
  --primary-color-x-light: #cbe5ff;
  --primary-color-dark: rgb(0, 130, 217);
  --ai-color: rgb(177, 0, 255);
  --error-color: red;
  --toxic-color: rgb(255, 123, 0);
  --neutral-color: rgb(78, 78, 78);
  --demo-metadata-color: #ff00d829;
  --box-shadow-default: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  --background-color-transition-default: background-color 0.1s linear;
  --light-grey: #ccc;
  --border-color: var(--light-grey);
  --disabled-color: var(--light-grey);
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 18px;
  --padding-html: 2rem;
  padding: var(--padding-html);
  width: calc(100vw - 2 * var(--padding-html));
  height: calc(100vh - 2 * var(--padding-html));
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

main {
  margin: 0 auto;
  height: 100%;
  max-width: 40rem;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* TYPOGRAHY */

h1 {
  text-align: center;
}

p {
  line-height: 3ch;
}

/* INPUTS + INPUT LAYOUT */

label {
  display: block;
  color: grey;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

form {
  min-width: 15rem;
  width: 60%;
  margin: 0 auto;
}

textarea {
  width: 100%;
  height: 6rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}

/* IMAGE */

.img-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

/* BUTTONS + BUTTON LAYOUT */

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  width: 5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--background-color-transition-default);
  &:disabled {
    background-color: var(--disabled-color);
    cursor: not-allowed;
  }
  &:hover {
    background-color: var(--primary-color-dark);
  }
}

.button-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin: 0.4rem 0;
}

/* LAYOUT */

.demo-metadata {
  position: fixed;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 0.6rem;
  background: var(--demo-metadata-color);
  backdrop-filter: blur(3px);
  font-size: smaller;
  text-align: center;
}

p.demo-explanation {
  line-height: 2ch;
  line-height: normal;
  text-align: left;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 0;
}
