/* Message List */
// a.k.a. notifications in the menu

.message-list {
  width: if($compact == 'true', 25.5em, 31.5em);
  padding: 0 $base_padding * 2;
  text-shadow: none;

  .message-list-placeholder { spacing: $base_spacing * 2; }
}

.message-list-sections {
  margin: 0 $base_margin * 4; // to account for scrollbar
}

.message-list-section,
.message-list-sections,
.message-list-section-list {
  spacing: $base_spacing;
}

// do-not-disturb + clear button
.message-list-controls {
  margin: ($base_margin * 2) ($base_margin * 4) 0;
  // NOTE: remove the padding if notification_bubble could remove margin for drop shadow
  padding: $base_margin;
  spacing: $base_spacing * 2;
}

// message bubbles
.message {
  margin: $base_spacing / 2 0;

  .popup-menu & {
    @extend %popover_bubble;
  }

  // icon container
  .message-icon-bin {
    margin: 8px 0;
    padding: 8px 0px 8px 8px;
    &:rtl { padding: 8px 8px 8px 0px; }

    // icon size and color
    > StIcon {
      icon-size: 32px; // 32px
      -st-icon-style: symbolic;
    }

    // fallback
    > .fallback-app-icon {
      width: 16px;
      height: 16px;
    }
  }

  .message-secondary-bin {
    padding: 0 $base_margin * 2;

    > .event-time {
      color: $text-disabled;
      @include fontsize($font_size - 2);
      text-align: right;
      padding-bottom: 0.13em;

      &:ltr { text-align: right };
      &:rtl { text-align: left };
    }
  }

  .message-title {
    color: $text;
    font-weight: bold;
  }

  .message-content {
    padding: $base_padding + $base_margin * 2;
    spacing: 4px;
    color: $text-disabled;
  }

  // close button
  .message-close-button {
    color: $text-secondary;
    padding: 0;
    height: 24px;
    width: 24px;
    border-radius: $circular_radius;

    &:hover, &:active { color: $text; }
    &:hover, &:focus { background-color: $divider; }
    &:active { background-color: $track; }
  }

  // body
  .message-body {
    color: $text-disabled;
  }
}

// URLs in messages
.url-highlighter {
  link-color: $link;
}

.message-media-control {
  margin: 18px $base_padding;
  padding: $base_padding * 1.5;
  border-radius: $circular_radius;
  color: $text-secondary;
  &:hover, &:focus { color: $text; background-color: $divider; }
  &:active { color: $text; background-color: $track; }
  &:insensitive { color: $text-secondary-disabled; }

  &:last-child:ltr { margin-right: $base_margin * 4; }
  &:last-child:rtl { margin-left: $base_margin * 4; }
}

// album-art
.media-message-cover-icon {
  icon-size: 32px !important;

  &.fallback {
    icon-size: 32px !important;
    border: none;
    border-radius: $menu_radius;
    background-color: $divider;
    color: $text-disabled;
  }
}
