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

.message-list {
  width: 30em;
  padding: 0 $base_margin;
  text-shadow: none;
  border: none;

  // padding and margins to account for scrollbar
  &:ltr {
    margin-left: 0;
    margin-right: 0;
    padding-right: 0;
    border-right-width: 0;
  }

  &:rtl {
    margin-right: 0;
    margin-left: 0;
    padding-left: 0;
    border-left-width: 0;
  }

  .message-list-placeholder {
    @extend %title_2;
    color: $disabled_fg_color;

    // icon size and color
    > StIcon {
      icon-size: $base_icon_size * 3; // 48px
      margin-bottom: $base_margin * 3;
      -st-icon-style: symbolic;
    }
  }
}

.message-list-sections {
  spacing: $base_padding;
  margin: 0;
  padding-bottom: $base_padding;

  // to account for scrollbar
  &:ltr { margin-right: $base_margin !important; }
  &:rtl { margin-left: $base_margin !important; }
}

.message-list-section,
.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;
  font-weight: normal;
}

// .message-list-clear-button.button {
//   margin: 8px 8px;
// }

// message bubbles
.message {
  .popup-menu & {
    @extend %popover_bubble;
    padding: $base_padding;
    margin: 3px 4px;
  }

  // icon container
  .message-icon-bin {
    margin: 0;
    padding: $base_padding * 4 $base_padding * 3;

    &:ltr { padding-right: $base_padding; }

    &:rtl { padding-left: $base_padding; }

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

    // fallback
    > .fallback-app-icon {
      width: $base_icon_size;
      height: $base_icon_size;
    }
  }

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

    > .event-time {
      color: $hint_fg_color;
      @extend %caption;
      /* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */
      padding-bottom: 0.13em;

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

  .message-title {
    padding-top: 0.57em;
    // color: $fg_color;
    font-weight: bold;
  }

  .message-content {
    color: $hint_fg_color;
    spacing: $base_margin;
    padding: $base_padding * 1.5;
    margin-bottom: $base_margin * 2;
  }

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

    &:hover, &:active { color: $fg_color; }
    &:hover, &:focus { background-color: $divider_color; }
    &:active { background-color: $track_color; }

    StIcon { icon-size: $base_icon_size; }
  }

  // body
  .message-body {
    color: $hint_fg_color;
  }
}

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

.message-media-control {
  margin: 20px 4px !important;
  padding: 8px !important;
  border-radius: $circular_radius;
  color: $alt_fg_color;
  &:hover, &:focus { color: $fg_color; background-color: $divider_color; }
  &:active { color: $fg_color; background-color: $track_color; }
  &:insensitive { color: $disabled_fg_color; }

  &:last-child:ltr { margin-right: 16px !important; padding-right: 8px !important; }
  &:last-child:rtl { margin-left: 16px !important; padding-left: 8px !important; }

  StIcon { icon-size: $base_icon_size !important; }
}

// album-art
.media-message-cover-icon {
  icon-size: $base_icon_size * 2 !important;
  margin-left: $base_padding !important;

  &:rtl { margin-right: $base_padding !important; }

  &.fallback {
    icon-size: $base_icon_size * 2 !important;
    padding: 4px;
    border: none;
    border-radius: $bt_radius;
    background-color: $divider_color;
    color: $hint_fg_color;
  }
}
