/**
 * Copyright (c) Cisco Systems, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */

 .timeline-item {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: $brand-font-regular;

  &.has-data {
    &:not(.is-wxcc-event) {
      &.hovered-over {
        background-color: var(--md-secondary-bg-color, #f7f7f7);
      }

      &.expanded-details {
        background: var(--md-tertiary-bg-color, #ededed);
      }
    }
  }

  .most-recent-header {
    display: none;
  }

  .body {
    display: flex;
    gap: 1.5rem;

    .vertical-date {
      display: flex;
      flex-direction: column;
      text-align: center;
      align-self: center;
      gap: 0.25rem;

      .month {
       font-size: 12px;
       line-height: 18px;
       font-weight: 600;
      }

      .day {
        font-size: 1rem;
        font-weight: 400;
        line-height: 24px;
      }
    }

    .right-section {
      flex: 1;

      .row {
        line-height: 21px;
      }
      .first-row {
        font-size: 14px;
        font-weight: 600;
        display: flex;
        align-items: center;

        .title {
          text-transform: capitalize;
        }

        .event-status-badge {
          margin-left: 0.5rem;
        }
      }

      .second-row {
        color: var(--md-secondary-text-color, #545454);
        margin-top: 6px;
        gap: 0.75rem;

        .description {
          height: 21px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          width: 75%;
        }
      }
    }

    .hover-arrow-section {
      color: var(--md-primary-text-color, #121212);
      display: flex;
      align-items: center;
      width: 1rem;
    }
  }
}

.most-recent .body .hover-arrow-section {
  align-items: unset;
}

.timeline-item.most-recent {
  background-color: var(--md-secondary-two-bg-color, #f7f7f7);

  .most-recent-header {
    display: block;
    margin: 0;
    font-weight: 400;
    font-size: 12px;
    margin-bottom: 0.5rem;
    color: var(--md-secondary-text-color, #545454);
    line-height: 18px;
  }

  .title {
    margin: 0;
  }

  .event-status-badge {
    display: none;
  }
}

.timeline-item.empty-most-recent {
  display: grid;
  grid-template-columns: 1fr auto 1fr;

  .body {
    align-items: center;

    .image-wrapper {
      height: 80px;
      width: 80px;
    }
  }
}


.event-icon {
  height: 1rem;
  margin-right: 0.5rem;
}

.event-icon::part(icon) {
  line-height: 16px;
  color: var(--md-secondary-text-color, #545454);
}

.grid {
  display: grid;
  grid-template-columns: minmax(auto, .5fr) 1fr;
  column-gap: 2rem;
  margin: 1rem;
  font-size: 12px;

  margin: 0;
  width: calc(100% - 24px);

  .cell {
    vertical-align: top;
  }

  .cell:nth-child(odd) {
    color: var(--md-secondary-text-color, #545454);
  }

  .cell:nth-child(even) {
    color: var(--md-primary-text-color, #121212);
  }
}

md-modal::part(modal-container) {
  width: 515px;
    height: 420px;
    max-height: calc(100vh - 100px);
    bottom: 1rem;
    right: 1rem;
    margin: unset;
    left: unset;
    top: unset;
}

md-modal::part(modal-backdrop) {
  background: unset;
  transition: unset;
}

md-modal::part(modal-content) {
  height: 100%;
}

md-modal::part(modal-header) {
  padding: 0px 0px 1rem;
  width: fit-content;
  margin-top: -8px;
}

md-modal::part(modal-body) {
  padding: 0;
}

.item-expand-button {
  height: 1rem;
  width: 1rem;
}
