// This file is part of Indico.
// Copyright (C) 2002 - 2026 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base' as *;

#abstract-notification-log {
  $padding: 0.25rem;

  width: 800px;
  min-height: 400px;
  max-height: 400px;
  overflow-y: auto;

  .log-entry {
    @include border-top();
    padding: $padding;

    &:last-child {
      @include border-bottom();
    }
  }

  .log-entry > .metadata {
    margin: -$padding;
    padding: $padding;
    padding-left: $padding * 2;

    .subject {
      font-weight: bold;
    }

    .template {
      @include border-bottom($style: dashed);
      font-weight: normal;
    }

    time {
      color: $dark-gray;
    }
  }

  .log-entry > .metadata:not(.legacy) {
    cursor: pointer;

    &:hover,
    &.open {
      @include inner-border-left($gray, $width: 2px);
      background-color: $light-gray;
      background-origin: border-box;
    }
  }

  .log-entry .content {
    @include inner-border-left($gray, $width: 2px);
    display: none;
    margin-left: -$padding;
    margin-top: $padding * 2;
    padding-left: $padding * 2;

    .metadata {
      color: $dark-gray;
      font-size: 0.9em;
    }

    .recipients {
      margin-left: 0.5em;
      align-self: center;
    }

    .template {
      @include border-bottom($style: dashed);
      align-self: center;
      margin-left: 0.5em;
      word-break: break-word;
    }

    .body {
      margin-top: $padding;
      word-break: break-word;
    }
  }
}
