@import "src/styles/variables";

.wrap {
  display: flex;
  flex-direction: column;

  textarea {
    min-height: 62px !important;
  }
}

.input {
  @include row_shadow;

  position: relative;
  flex: 1;
  padding: 5px;
}

.buttons {
  position: relative;
  z-index: 1;
  display: grid;
  background: transparentize(black, 0.8);
  padding: $gap / 2;
  border-radius: 0 0 $radius $radius;
  flex-wrap: wrap;
  column-gap: $gap;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr;
  grid-template-areas: "attach format submit";

  @media(max-width: 470px) {
    padding: $gap;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
    "attach format"
    "submit submit";
    row-gap: $gap;
  }

  &_attach {
    grid-area: attach;
  }

  &_format {
    grid-area: format;
  }

  &_submit {
    grid-area: submit;
    display: grid;
    grid-auto-flow: column;
    align-items: flex-end;
    justify-content: flex-end;
    column-gap: $gap / 2;
  }
}

.uploads {
  padding: ($gap / 2);
  display: grid;
  grid-column-gap: $gap / 2;
  grid-row-gap: $gap / 2;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.attaches {
  @include outer_shadow();
}

.error {
  position: absolute;
  bottom: 0;
  left: 50%;
  background: $red;
  z-index: 10;
  font: $font_12_regular;
  box-sizing: border-box;
  padding: 0 $gap;
  border-radius: 4px 4px 0 0;
  transform: translate(-50%, 0);
  cursor: pointer;
}
