// Copyright 2019-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only

@import '../mixins';
@import '../../stylesheets/variables';

.base {
  width: 380px;
  padding: 4px;
  display: flex;
  flex-direction: row;
  border-radius: 8px;
  box-shadow: 0 2px 13px 3px rgba(0, 0, 0, 0.3);
  position: relative;

  @include light-theme() {
    background: $color-white;
  }

  @include dark-theme() {
    background: $color-gray-75;
  }
}

.frame {
  width: 50%;
  padding: 12px 12px 3px 12px;
}

.frame-light {
  composes: frame;
  background: $color-white;
  border-radius: 6px 0 0 6px;
}

.frame-dark {
  composes: frame;
  background: $color-black;
  border-radius: 0 6px 6px 0;
}

.arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.arrow-top {
  composes: arrow;
  border-width: 0 8px 8px 8px;
  top: -8px;

  @include light-theme() {
    border-color: transparent transparent $color-white transparent;
  }

  @include dark-theme() {
    border-color: transparent transparent $color-gray-75 transparent;
  }
}

.arrow-bottom {
  composes: arrow;
  border-width: 8px 8px 0 8px;
  bottom: -8px;

  @include light-theme() {
    border-color: $color-white transparent transparent transparent;
  }

  @include dark-theme() {
    border-color: $color-gray-75 transparent transparent transparent;
  }
}

.arrow-left {
  composes: arrow;
  border-width: 8px 8px 8px 0;
  left: -8px;

  @include light-theme() {
    border-color: transparent $color-white transparent transparent;
  }

  @include dark-theme() {
    border-color: transparent $color-gray-75 transparent transparent;
  }
}

.arrow-right {
  composes: arrow;
  border-width: 8px 0 8px 8px;
  right: -8px;

  @include light-theme() {
    border-color: transparent transparent transparent $color-white;
  }

  @include dark-theme() {
    border-color: transparent transparent transparent $color-gray-75;
  }
}