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

// main list
.message-list {
  width: 31.5em;
  padding: 0;
  color: $secondary_fg_color;
  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 {
    spacing: $container_padding * 2;
    color: $disabled_secondary_fg_color;

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

.message-list-sections {
  spacing: $container_padding;
  margin: 0 $container_margin * 4 0 $container_margin + $container_padding; // to account for scrollbar
}

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

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

// message bubbles
.message {
  background-color: if($variant == 'light', rgba(black, 0.04), rgba(white, 0.03));
  border: none;
  border-radius: $material_radius;
  color: $secondary_fg_color;
  text-shadow: none;

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

  .popup-menu & { box-shadow: none; }

  // icon container
  .message-icon-bin {
    padding: $container_padding * 3;
    padding-right: $container_padding;

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

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

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

  // content
  .message-content {
    spacing: 4px;
    padding: $container_padding * 1.5;
    margin-bottom: $container_margin * 2;
    color: $secondary_fg_color;
  }

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

  // secondary container in title box
  .message-secondary-bin {
    padding: 0 $container_margin * 2;

    // notification time stamp
    > .event-time {
      color: $secondary_fg_color;
      font-size: 0.9em;
      padding-bottom: 0.13em;

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

  // close button
  .message-close-button {
    color: $secondary_fg_color;
    padding: 0;
    height: $menuitem-size - 4px;
    width: $menuitem-size - 4px;
    border-radius: $circular_radius;

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

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

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

/* Media Controls */
.message-media-control {
  margin: ($container_padding * 2 + 10px) 4px;
  padding: $container_padding * 2;
  border-radius: $circular_radius;
  color: $secondary_fg_color;
  &:hover, &:focus { color: $fg_color; background-color: $divider_color; }
  &:active { color: $fg_color; background-color: $track_color; }
  &:insensitive { color: $disabled_secondary_fg_color; }

  &:last-child:ltr { margin-right: 16px; }
  &:last-child:rtl { margin-left: 16px; }
}

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

  // when there is no artwork
  &.fallback {
    background-color: $divider_color;
    padding: $container_padding * 2;
    color: $hint_fg_color;
    border: none;
    border-radius: $buttons_radius;
    icon-size: 24px !important;
  }
}
