// SPDX-FileCopyrightText: 2024 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

// Header
.schedules-header {
  margin-left: 12em;
  margin-right: 1em;
  width: ~"calc(100% - 13em)"; // margin-left + margin-right

  .days-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(2em, 1fr));
    border-left: 2px solid @gray-lighter;

    .column-title {
      border-right: 1px solid @gray-lighter;
    }
  }
}

// Layout
.item-list .schedule {
  .main {
    display: flex;
    align-items: center;
    header .title {
      width: 10em;
      display: inline-flex;
    }

    .caption {
      display: flex;
      width: 100%;
      height: 2em;
      align-items: center;

      > .timeline {
        flex-grow: 1;
      }
    }
  }

  .timeline .time-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);

    .grid {
      border-width: 0 0 0 2px;
    }

    .grid,
    .overlay {
      grid-area: ~"1 / 1 / 2 / 2";

      .entry {
        margin: 0;

        .title {
          align-items: center;
        }
      }
    }
  }
}

// Design
.item-list .schedule .timeline {
  .time-grid {
    .grid {
      .step {
        border-bottom: unset;
      }
    }
  }

  .time-grid:after {
    display: none;
  }
}
