@import "~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables";

.compose-container {
  #shadow-root .va-modal-body {
    padding: 0;
  }
  va-select.composeSelect::part(label)::after {
    content: " (*Required)";
    color: var(--vads-color-secondary-dark);
  }
  va-select.composeSelect::part(select) {
    max-width: 100%;
  }
  @media (min-width: $medium-screen) {
    padding: 0;
    label {
      max-width: 100%;
    }
  }
  @media (min-width: $large-screen) {
    padding: 0;
  }
  .breadcrumb > i {
    margin-right: 6px;
    font-size: 0.6875rem;
  }
  va-checkbox::part(checkbox) {
    max-width: 100% !important;
  }
  va-checkbox::part(label) {
    cursor: pointer;
    display: inherit;
    font-weight: normal;
    margin-top: 0.75rem;
    padding-left: 2rem;
    position: relative;
  }
  .edit-input-button {
    padding: 0;
    margin: 0;
    width: fit-content;
  }

  .recipientSelectHeading {
    font-size: 1.5rem;
  }

  .message-body-draft-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .compose-form {
    background-color: var(--vads-color-white);
    .required {
      color: var(--vads-color-secondary-dark);
    }
    .compose-form-div {
      margin-bottom: 24px;
    }
    va-text-input#message-subject::part(input) {
      max-width: 100%;
    }
    va-textarea#compose-message-body::part(input-type-textarea) {
      max-width: 100%;
      resize: vertical;
      box-sizing: border-box;
    }

    .attachments-section {
      .compose-attachments-heading {
        margin: 27px 0 8px;
      }
    }
    .last-save-time {
      margin-top: 12px;
    }
  }
  .reply-form {
    margin: 1.25rem 0 0.625rem 0;
    background-color: var(--vads-color-white);
    .required {
      color: var(--vads-color-secondary-dark);
    }
    .compose-form-div {
      margin-bottom: 24px;
    }
    va-text-input#message-subject::part(input) {
      max-width: 100%;
      // background-color: var(--vads-color-base-darker);
    }
    va-textarea#reply-message-body::part(input-type-textarea) {
      max-width: 100%;
      resize: vertical;
      box-sizing: border-box;
    }

    .compose-inputs-container {
      border: 2px solid var(--vads-color-base-lightest);
      border-radius: 0 0 4px 4px;
      padding: 0 14px 14px;
      @media (min-width: $medium-screen) {
        padding: 0 36px 36px;
      }
      .message-subject {
        max-width: 100%;
        width: 100%;
        padding: 0.75rem;
        margin: 0.25rem 0px;
      }
      .message-body {
        min-height: 3.25rem;
        max-width: 100%;
        width: 100%;
        padding: 0.75rem;
        margin: 0.25rem 0px;
        resize: none;
      }

      .attachments-section {
        .compose-attachments-heading {
          margin: 27px 0 8px;
        }
      }

      .compose-form-actions {
        display: flex;
        flex-direction: column;
      }
    }
    .last-save-time {
      margin-top: 12px;
    }
  }
}

.edit-preferences-button {
  box-shadow: inset 0 0 0 2px var(--vads-color-base-darker);
  color: var(--vads-color-base-darker);
  height: 36px;

  &:hover {
    color: var(--vads-color-base-darker);
    background-color: var(--vads-color-gray-cool-light) !important;
  }
  @media (max-width: $small-screen) {
    width: 100%;
  }
}

.file-input {
  .attach-file-button {
    display: block;
    margin: 16px 0px 24px 0;
    width: 100%;
  }

  .attach-file-button::part(button) {
    box-shadow: inset 0 0 0 2px var(--vads-color-base-darker);
    color: var(--vads-color-base-darker);
    height: 36px;
    width: 100%;

    @media (min-width: $small-screen) {
      width: auto;
    }
  }

  .how-to-attach-files {
    list-style: square;
    * {
      line-height: 24px;
      margin: 16px 0;
    }
  }
}

.compose-form-actions {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  va-button {
    display: block;
    height: 36px;
    padding: 0;
  }

  button {
    height: 36px;
  }

  @media (min-width: $medium-screen) {
    margin-right: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    button {
      margin-bottom: auto;
    }
  }

  va-button::part(button) {
    height: 36px;
    width: 100%;
    margin: 0;
    white-space: nowrap;
  }

  i {
    margin-right: 4px;
  }
}
