.root {
  --border-radius-default: 0.625rem;

  :global {
    .modal-dialog {
      max-width: 26.25rem;

      @media (max-width: 600px) {
        max-height: 100%;
      }
    }

    .modal-header-condensed {
      padding: 0.375rem 1.125rem !important;
      border-bottom: 1px solid transparent;
      transition: border-color 250ms ease-in-out;
    }

    .modal-content {
      overflow-x: auto;
      display: flex;
      flex-direction: column;
      // Full height - header - margins
      max-height: calc(100vh - 3.25rem - 5rem);
      padding: 0;

      @media (max-width: 600px) {
        padding-bottom: env(safe-area-inset-bottom);
      }
    }

    .symbol-menu-button {
      flex-shrink: 0;
      align-self: flex-end;

      width: 3.5rem !important;
      height: 3.5rem !important;
      padding: 0 !important;

      background: none !important;
    }

    .symbol-menu-button, .mobile-symbol-menu-button {
      margin-right: -1.75rem;
      margin-left: -0.25rem !important;
      color: var(--color-composer-button);
    }

    .mobile-symbol-menu-button {
      width: 2.875rem;
      height: 2.875rem;
      margin-right: -1.25rem !important;
      margin-left: 0 !important;
    }
  }

  :global(body.keyboard-visible) & :global(.modal-content) {
    padding-bottom: 0;
  }

  &.mobile :global {
    .modal-dialog {
      align-self: end;

      max-width: 100% !important;
      margin: 0;
      border-bottom-right-radius: 0;
      border-bottom-left-radius: 0;
    }
  }

  &.mobile:global(:not(.open)) :global(.modal-dialog) {
    transform: translate3d(0, 8rem, 0);
  }

  &.mobile.symbolMenuOpen :global(.modal-dialog) {
    transform: translate3d(0, calc((var(--symbol-menu-height)) * -1), 0);
    transition: var(--layer-transition);

    @media (max-width: 600px) {
      transform: translate3d(0, calc((var(--symbol-menu-height) - env(safe-area-inset-bottom)) * -1), 0);
    }
  }

  &.header-border :global(.modal-header-condensed) {
    border-bottom-color: var(--color-borders);
  }
}

.sendButtonStar {
  margin-inline-start: 0 !important;
  margin-inline-end: 0.125rem !important;
}

.attachments {
  overflow: auto;
  display: flex;
  flex-shrink: 1;
  flex-wrap: wrap;
  gap: 0.5rem;

  min-height: 5rem;
  max-height: 26rem;
  margin: 0 0.25rem;
  padding: 0 0.25rem;

  @media (max-width: 600px) {
    max-height: 80vh;
  }
}

.attachments-bottom-padding {
  padding-bottom: 0.5rem;
}

.caption-wrapper {
  position: relative;
  padding: 0 0.5rem;
  border-top: 1px solid transparent;
  transition: border-color 250ms ease-in-out;

  :global {
    .form-control {
      background: var(--color-background);
    }

    .MentionTooltip {
      z-index: 0;
      right: 0 !important;
    }
  }
}

.caption-top-border {
  border-top-color: var(--color-borders);
}

.caption {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dropTarget {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dropOutlineContainer {
  pointer-events: none;

  position: absolute;
  z-index: 2;
  left: 0.5rem;

  overflow: visible !important;

  width: calc(100% - 1rem);
  height: calc(100% - 0.5rem);
  padding-top: 0.5rem;

  opacity: 0;
  background-color: var(--color-background);

  transition: opacity 0.2s;
}

.dropOutline {
  fill: none;
  stroke: var(--color-primary);
  stroke-dasharray: 11, 8;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  stroke-width: 2;

  animation: outline 0.5s linear infinite;
  animation-play-state: paused;
}

.hovered {
  .dropOutline {
    animation-play-state: running;
  }

  .dropOutlineContainer {
    opacity: 1;
  }

  .dropTarget {
    &::after {
      content: attr(data-attach-description);

      position: absolute;
      z-index: 2;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);

      color: var(--color-primary);
    }

    .caption-wrapper,
    .attachments,
    :global(.input-scroller),
    :global(.custom-scroll),
    :global(.custom-scroll-x) {
      pointer-events: none !important;
    }
  }
}

.send-wrapper {
  position: relative;
  align-self: flex-end;
  padding-bottom: 0.5rem;
}

.send {
  padding: 0 1rem !important;
}

:global {
  .CustomSendMenu {
    bottom: 2.25rem;

    .is-pointer-env & > .backdrop {
      top: -2rem;
      bottom: auto;
      width: 100%;
      height: 3.5rem;
    }
  }
}

@keyframes outline {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -19;
  }
}
