// 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 *;

.author-info {
  table-layout: auto;

  td {
    &.caption {
      width: 150px;
    }
  }
}

.generic-data {
  line-height: 1.6em;
  font-size: 1.2em;
  color: $light-black;

  .header-data {
    &::before {
      color: $dark-orange;
      vertical-align: middle;
      margin-right: 0.2em;
    }
  }
}

.conference-page {
  @include font-family-modern-body();

  .item-text {
    clear: both;
    color: $black;
    margin-bottom: 2em;
  }

  h3 {
    margin: 1em 0 0.5em 0;
    color: $dark-orange;

    &:first-child {
      margin-top: 0;
    }

    &[class^='icon-']::before,
    &[class*=' icon-']::before {
      margin-right: 5px;
    }
  }

  .other-fields {
    margin-left: 2em;

    th {
      @include ellipsis();

      color: $dark-orange;
      text-align: right;
      vertical-align: top;
      max-width: 220px;
    }
  }

  .description,
  .infogrid {
    @include font-family-modern-body();
    margin-bottom: 1em;

    li p {
      margin-bottom: 0;
    }

    ul {
      margin-bottom: 0.8em;
    }
  }

  .item-attachments .i-button {
    margin-top: 0;
  }

  .item-subitems {
    margin-bottom: 1em;
    margin-top: 2em;
  }

  .session-conveners {
    color: $light-black;

    .header {
      margin-bottom: 0;
    }

    .header-row h4 {
      margin-top: 1.25em;
    }

    ul {
      padding: 0;
      margin: 0.5em 1em 0 1em;
      list-style-type: none;

      li {
        @include ellipsis();

        margin: 0.5em 0;
      }
    }
  }

  section {
    margin-top: 2.5em;

    &:first-child {
      margin-top: 0;
    }

    .header {
      @extend .flexcol;
      margin-bottom: 1.5em;

      .toolbar {
        margin-bottom: 0;
        padding: 0;
        min-height: 0;
      }

      .group {
        margin-bottom: 0;
      }

      > * {
        &:first-child {
          margin-top: 0;
          margin-bottom: 0;
        }
      }
    }

    .header-row {
      @extend .flexrow;

      > * {
        margin: 0;
      }

      &.centered {
        align-self: center;
      }

      h2 {
        color: $dark-orange;
        font-size: 2em;
        font-weight: normal;
      }

      h3 {
        flex-grow: 1;
        color: $dark-orange;
        font-size: 1.5em;
        font-weight: normal;

        &[class^='icon-']::before,
        &[class*=' icon-']::before {
          margin-right: 5px;
        }
      }

      h4 {
        color: $light-black;
        font-size: 1.1em;
        margin-top: 0.5em;
      }
    }
  }
}

.contribution-list,
.track-review-list {
  @include font-family-modern-body();

  .contribution-row,
  .track-review-row {
    padding: 0 10px;
    border-left: 3px solid $pastel-gray;
    margin-bottom: 1em;

    .contrib-title {
      font-size: 1.2em;
    }

    .contrib-code {
      color: $dark-gray;
      font-size: 0.8em;
    }

    .description {
      position: relative;
      color: $dark-gray;
      max-height: 4.2em;
      overflow: hidden;

      &::before {
        content: '';
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        position: absolute;
        background: linear-gradient(transparent 0.4em, white 4.2em);
      }
    }

    &:hover {
      border-color: $blue;
    }
  }
}

.contrib-session,
.contrib-track,
.contrib-type,
.contrib-state {
  @include default-border-radius();
  @include ellipsis();

  display: inline-block;
  margin-left: 5px;
  padding: 0.5em;
  max-width: 12em;

  &.small {
    padding: 0.2em;
    font-size: 0.9em;
    margin-left: 0;
  }
}

.contrib-type {
  margin: 6px 3px 0 0;
  padding: 0.5em;
  color: $light-gray;
  background-color: $dark-blue;
}

.contrib-track {
  background: $dark-gray;
  color: $light-blue;
}

.contrib-session {
  a {
    line-height: 1em;
  }
}

.contrib-time {
  color: $black;
}

ul.author-list {
  list-style-type: none;
  padding: 0;

  .speaker-item {
    border-bottom: 1px solid $pastel-gray;
    margin-bottom: 0.5em;

    .affiliation {
      font-size: 1em;

      .text {
        max-width: 30em;
      }
    }

    .name {
      font-size: 1.5em;
    }
  }

  > .speaker-list-item {
    margin-bottom: 1.5em;
  }

  ul.author-links {
    list-style-type: none;
    padding-left: 0;

    > li {
      margin-bottom: 0.5em;

      .contrib-role {
        color: $light-black;
      }
    }
  }
}
