@font-face {
  font-family: "Boston";
  src: local("Boston"), url("../fonts/boston-bold.woff2") format("woff2");
  font-weight: bold;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-dark: #000;
  --color-light: #fff;
  --color-gray: #eee;
  --color-highlight: #44e543;
  --color-error: red;
  --animation-timing-fn: cubic-bezier(0.87, 0, 0.13, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font: bold 1rem/1.5 "Boston", sans-serif;
}

.button {
  position: relative;
  padding: 0.75rem;
  border-radius: 1rem;
  border-style: none;
  font: inherit;
  font-size: 0.875rem;
  text-align: center;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.button,
.button.is-loading::before {
  background-color: var(--color-dark);
  color: var(--color-light);
}

.button--primary,
.button--primary.is-loading::before {
  background-color: var(--color-highlight);
  color: var(--color-dark);
}

.button.is-loading {
  pointer-events: none;
}

.button.is-loading::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  opacity: 0.75;
}

.button.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 1.5rem;
  width: 1em;
  height: 1em;
  margin: -0.5em;
  border-radius: 50%;
  border: 2px solid;
  border-top-color: transparent;
  animation: rotate 1s linear infinite;
}

.button[disabled] {
  background-color: var(--color-gray);
  color: var(--color-dark);
}

.input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 0.75rem;
  height: 6rem;
  border: 2px solid;
  border-radius: 1rem;
  resize: none;
  font: inherit;
  font-size: 1rem;
}

.input:focus {
  border-color: var(--color-highlight);
  outline: none;
}

.icon {
  position: relative;
  display: inline-block;
  font-size: 1.5rem;
  width: 1em;
  height: 1em;
}

.icon--back::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.16667em;
  margin-top: -0.25em;
  width: 0.5em;
  height: 0.5em;
  border: 2px solid;
  border-style: none none solid solid;
  transform: rotate(45deg);
}

.icon--back::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.16667em;
  margin-top: -1px;
  width: 0.66667em;
  border-top: 2px solid;
}

.image {
  position: relative;
  border-radius: 1rem;
  background-color: var(--color-gray);
  overflow: hidden;
}

.image::before {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.image__background,
.image__foreground {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-position: center;
  background-repeat: no-repeat;
}

.image__background {
  background-size: cover;
  filter: blur(32px);
}

.image__foreground {
  background-size: contain;
}

.overlay {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: calc(100% - 2rem);
  max-width: 20rem;
  max-height: calc(100% - 2rem);
  transform: translateX(-50%);
  padding: 1rem 0.75rem 0.75rem 0.75rem;
  border-radius: 1.5rem;
  background-color: var(--color-dark);
  color: var(--color-light);
  overflow: hidden;
}

.overlay::after {
  content: "";
  display: block;
  font-size: 0.5rem;
  width: 5.5em;
  height: 1em;
  margin: 0 auto 0.5rem;
  background-image: linear-gradient(45deg, var(--color-dark) 0.5em, transparent 0), linear-gradient(-45deg, var(--color-dark) 0.5em, transparent 0), linear-gradient(45deg, var(--color-highlight) 0.5em, transparent 0), linear-gradient(-45deg, var(--color-highlight) 0.5em, transparent 0);
  background-size: 1em 1em;
  background-repeat: repeat-x;
  background-position: 0 1px, 0 1px, 0 -1px, 0 -1px;
}

.overlay--highlight {
  background-color: var(--color-light);
  color: var(--color-dark);
}

.overlay--highlight::after {
  display: none;
}

.overlay__title {
  position: relative;
  margin-bottom: 1rem;
  text-align: center;
}

.overlay__icon {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.5s var(--animation-timing-fn);
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.overlay:not(.is-open) .overlay__icon {
  transform: translateX(-2.25rem);
}

.overlay__section {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s var(--animation-timing-fn);
}

.overlay.is-open .overlay__section {
  max-height: 26rem;
  overflow: auto;
}

.overlay__image,
.overlay__input {
  margin-bottom: 0.75rem;
}

.overlay__error {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
  color: var(--color-error);
}

.overlay__buttons {
  position: relative;
  display: flex;
  align-self: flex-end;
  width: 100%;
  box-shadow: 0 0 1rem 0.5rem var(--color-light);
  transition: width 0.5s var(--animation-timing-fn);
}

.overlay__buttons .button {
  flex-grow: 1;
  flex-basis: 0;
  white-space: nowrap;
}

.overlay__buttons .button + .button {
  margin-left: 0.75rem;
}

.overlay.is-open .overlay__buttons {
  width: calc(200% + 0.75rem);
}

.is-hidden:not(.is-open),
.overlay.is-open .if-overlay-closed,
.overlay:not(.is-open) .if-overlay-open,
#error-popup {
  display: none;
}