@import 'shared';

:local(.ui) {
  @extend %default-font;

  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  pointer-events: none;

  :local(.help-icon) {
    @extend %fa-icon-button;
    pointer-events: auto;
    position: absolute;
    top: 0px;
    right: 14px;

    i {
      background: white;
      border-radius: 36px;
      display: inline-block;
      font-size: 22px;
      vertical-align: sub;
      line-height: 34px;
      border: 0;
      width: 36px;
      height: 36px;
    }
  }
}

:local(.ui-dialog) {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  @extend %unselectable;
  flex-direction: column;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

:local(.ui-dialog-box-contents) {
  background-color: $white-transparent;
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 600px;
  z-index: 2;
  position: relative;

  :local(.backgrounded) {
    filter: blur(1px);
    opacity: 0.7;
    pointer-events: none;
  }
}

:local(.ui-interactive) {
  pointer-events: auto;
  @extend %unselectable;
}

:local(.invite-container) {
  @extend %unselectable;
  position: absolute;
  top: 0;
  left: 0;
  margin-top: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;

  button {
    @extend %action-button;
    pointer-events: auto;
  }

  @media (max-height: 320px) {
    display: none;
  }

  :local(.hide-small-screens) {
    display: none;

    @media (min-height: 737px) {
      display: flex;
    }
  }

  :local(.invite-mini-button) {
    display: none;
    background-color: $hud-panel-background;
    height: 28px;
    font-size: 0.8em;

    @media (max-height: 736px) and (min-height: 325px) {
      display: flex;
    }
  }
}

:local(.invite-container-inverted) {
  button {
    @extend %action-button-selected;
  }
}

:local(.invite-container-below-hud) {
  margin-top: 100px;
}

:local(.nag-corner-button) {
  position: absolute;
  bottom: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 80px;
  pointer-events: none;

  button {
    @extend %default-font;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    min-width: 150px;
    margin-right: 12px;
    margin-left: 12px;
    white-space: nowrap;
    background: none;
    border: none;
    pointer-events: auto;
    padding: 16px 28px;
    height: 58px;
    color: $light-text;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 1.0);
    text-decoration: underline;
  }

  @media (max-width: 740px) {
    display: none;
  }
}

:local(.presence-info) {
  @extend %unselectable;
  text-align: right;
  position: absolute;
  top: 0;
  left: 16px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 1.3em;
  background-color: white;
  border-radius: 24px;
  font-weight: bold;
  padding: 8px 18px;
  pointer-events: auto;
  cursor: pointer;

  @media (min-width: 769px) and (min-height: 421px) {
    flex: 1;
  }
  @media (max-width: 768px) , (max-height: 420px) {
    margin: 16px 0;
    margin-right: 0;
    padding: 2px 8px;
  }
  :local(.occupant-count) {
    margin: 0 12px;
  }
}

:local(.presence-info-selected) {
  color: $action-color;
}

:local(.message-entry) {
  position: relative;
  margin: 8px 24px 24px 24px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  border: 1px solid #e2e2e2;
  border-radius: 16px;
}

:local(.message-entry-input) {
  @extend %default-font;
  pointer-events: auto;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  outline-style: none;
  overflow: hidden;
  resize: none;
  background-color: transparent;
  color: black;
  padding: 8px 1.25em;
  line-height: 28px;
  font-size: 1.1em;
  width: 100%;
  border: 0px;
  height: 32px;
  margin-right: 100px;
}

:local(.message-entry-input)::placeholder{
  color: $dark-grey;
  font-weight: 300;
  font-style: italic;
}

:local(.message-entry-submit) {
  @extend %action-button;
  position: absolute;
  right: 10px;
  height: 32px;
  min-width: 80px;
  bottom: 8px;
  border-radius: 10px;
}

:local(.message-entry-in-room) {
  @media(max-width: 900px) {
    display:none;
  }

  position: absolute;
  left: 16px;
  bottom: 20px;
  width: 33%;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: $darker-grey;
  border-radius: 16px;
  pointer-events: auto;
  opacity: 0.3;
  transition: opacity 0.15s linear;

  :local(.message-entry-input-in-room) {
    color: white;
    padding: 8px 1.25em;
    margin-left: 32px;
  }

  :local(.message-entry-spawn) {
    @extend %action-button;
    position: absolute;
    left: 12px;
    height: 32px;
    width: 32px;
    bottom: 8px;
    min-width: auto;
    background-size: 90%;
    background-image: url(../spawn_message.png);
    background-position-x: 1px;
    background-position-y: 1px;
    padding: 0;
    border-radius: 16px;
    visibility: hidden;
  }

  :local(.message-entry-submit-in-room) {
    border: 0;
    visibility: hidden;
  }
}

:local(.message-entry-in-room):focus-within {
  opacity: 1.0;
  transition: opacity 0.15s linear;

  :local(.message-entry-submit-in-room) {
    visibility: visible;
  }

  :local(.message-entry-spawn) {
    visibility: visible;
  }
}