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

// main list
.message-list {
  width: 31.5em;
  padding: 0;
  color: $text-secondary;
  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: $space-size * 2;
    color: $text-secondary-disabled;

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

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

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

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

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

  &:hover, &:focus { background-color: $secondary-fill; }
  &:active { background-color: $track; }

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

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

    &:rtl {
      padding-left: $space-size;
    }

    // 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: $space-size * 1.5;
    margin-bottom: $margin-size * 2;
    color: $text-secondary;
  }

  // title
  .message-title {
    font-weight: bold;
    padding-top: 0.57em;
    color: $text-secondary;
    // margin-top: $space-size;
  }

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

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

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

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

    &:hover, &:focus { color: $text; background-color: $secondary-fill; }
    &:active { color: $text; background-color: $track; }
    &:insensitive { color: $text-secondary-disabled; }
  }

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

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

/* Media Controls */
.message-media-control {
  margin: ($space-size * 2 + 12px) 4px !important;
  padding: $space-size * 2 !important;
  border-radius: $circular-radius;
  color: $text-secondary;

  &:hover, &:focus { color: $text; background-color: $secondary-fill; }
  &:active { color: $text; background-color: $track; }
  &:insensitive { color: $text-secondary-disabled; }

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

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

  // when there is no artwork
  &.fallback {
    background-color: $secondary-fill;
    padding: $space-size * 2;
    color: $text-disabled;
    border: none;
    border-radius: $material-radius;
    icon-size: 24px !important;
  }
}
