/**
 * @file
 * MyEvent activity timeline.
 *
 * The type classes supplied by the timeline block control the marker icon,
 * marker colour and card accent without changing the module's markup.
 */

.group.group--full.group--event-group .ptah-event-timeline {
  --timeline-accent: #743cfb;
  --timeline-accent-dark: #5f2ae5;
  --timeline-ink: #292738;
  --timeline-muted: #706b7d;
  --timeline-border: #e5e0ed;
  background: #fbfaff;
  border: 1px solid #ebe6f3;
  border-radius: 0.9rem;
  box-shadow: 0 0.7rem 2rem rgb(50 37 79 / 5%);
  box-sizing: border-box;
  margin: clamp(2rem, 4vw, 3.5rem) auto 1.5rem;
  max-width: 70rem;
  overflow: hidden;
  padding: clamp(1.15rem, 2.5vw, 1.65rem);
}

/* Heading and activity count. */
.group.group--full.group--event-group
.ptah-event-timeline__heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 0 1.5rem;
  padding: 0 0.1rem;
}

.group.group--full.group--event-group
.ptah-event-timeline__heading h2 {
  color: var(--timeline-ink) !important;
  font-size: clamp(1.5rem, 2.3vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0;
  min-height: 2.8rem;
  padding: 0.05rem 0 0 3.45rem;
  position: relative;
  text-shadow: none !important;
}

.group.group--full.group--event-group
.ptah-event-timeline__heading h2::before {
  background-color: var(--timeline-accent);
  content: "";
  height: 1.45rem;
  left: 0.68rem;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5v5l3.2 2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5v5l3.2 2'/%3E%3C/svg%3E") center / contain no-repeat;
  position: absolute;
  top: 0.62rem;
  width: 1.45rem;
  z-index: 1;
}

.group.group--full.group--event-group
.ptah-event-timeline__heading h2::after {
  color: var(--timeline-muted);
  content: "The latest activity from your event.";
  display: block;
  font-size: 0.92rem;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.45;
  margin-top: 0.28rem;
}

/* Keep the icon's soft circular tile behind the masked clock. */
.group.group--full.group--event-group
.ptah-event-timeline__heading {
  position: relative;
}

.group.group--full.group--event-group
.ptah-event-timeline__heading::before {
  background: #f0eaff;
  border-radius: 0.7rem;
  content: "";
  height: 2.75rem;
  left: 0;
  position: absolute;
  top: 0;
  width: 2.75rem;
}

.group.group--full.group--event-group
.ptah-event-timeline__heading > span {
  background: #eee7ff;
  border: 1px solid #e4d9ff;
  border-radius: 999px;
  color: var(--timeline-accent-dark);
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1;
  padding: 0.63rem 0.9rem;
  white-space: nowrap;
}

/* Chronological list. */
.group.group--full.group--event-group
.ptah-event-timeline__list {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  background: transparent;
}

.group.group--full.group--event-group
.ptah-event-timeline__list::before {
  background: #ddd4ef;
  bottom: 2.35rem;
  content: "";
  left: 8.5rem;
  position: absolute;
  top: 2.35rem;
  width: 1px;
}

.group.group--full.group--event-group
.ptah-event-timeline__item {
  --timeline-type: #743cfb;
  --timeline-type-soft: #f1ebff;
  --timeline-type-border: #d8cafa;
  --timeline-marker-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: 7rem 3rem minmax(0, 1fr);
  margin: 0;
  min-height: 4.7rem;
  padding: 0;
  position: relative;
  background: transparent;
}

.group.group--full.group--event-group
.ptah-event-timeline__item.is-document {
  --timeline-type: #743cfb;
  --timeline-type-soft: #f1ebff;
  --timeline-type-border: #d8cafa;
  --timeline-marker-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6Z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E");
}

.group.group--full.group--event-group
.ptah-event-timeline__item.is-itinerary {
  --timeline-type: #18aaa8;
  --timeline-type-soft: #e7fafa;
  --timeline-type-border: #a8e5e3;
  --timeline-marker-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5.5' width='16' height='14' rx='2'/%3E%3Cpath d='M8 3v5M16 3v5M4 10h16'/%3E%3C/svg%3E");
}

.group.group--full.group--event-group
.ptah-event-timeline__item.is-rsvp {
  --timeline-type: #32ad5b;
  --timeline-type-soft: #e9f9ee;
  --timeline-type-border: #b4e6c4;
  --timeline-marker-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7' r='3'/%3E%3Cpath d='M3.5 18a5.5 5.5 0 0 1 11 0'/%3E%3Cpath d='m15 14 2 2 4-4'/%3E%3C/svg%3E");
}

.group.group--full.group--event-group
.ptah-event-timeline__item.is-event {
  --timeline-type: #e99a19;
  --timeline-type-soft: #fff6e5;
  --timeline-type-border: #f2d49d;
  --timeline-marker-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5.5' width='16' height='14' rx='2'/%3E%3Cpath d='M8 3v5M16 3v5M4 10h16M12 13l.6 1.2 1.4.2-1 1 .2 1.4-1.2-.7-1.2.7.2-1.4-1-1 1.4-.2Z'/%3E%3C/svg%3E");
}

/* Date column. */
.group.group--full.group--event-group
.ptah-event-timeline__date {
  align-self: center;
  color: var(--timeline-ink);
  grid-column: 1;
  line-height: 1.2;
  padding: 0 0.9rem 0 0;
  text-align: right;
}

.group.group--full.group--event-group
.ptah-event-timeline__date strong {
  color: inherit;
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  white-space: nowrap;
}

.group.group--full.group--event-group
.ptah-event-timeline__date span {
  color: var(--timeline-muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 550;
  margin-top: 0.22rem;
}

/* Type-specific marker. */
.group.group--full.group--event-group
.ptah-event-timeline__marker {
  align-self: center;
  background: var(--timeline-type-soft);
  border: 1px solid var(--timeline-type-border);
  border-radius: 50%;
  box-shadow: 0 0 0 0.3rem #fbfaff;
  color: var(--timeline-type);
  display: block;
  grid-column: 2;
  height: 2.55rem;
  justify-self: center;
  position: relative;
  width: 2.55rem;
  z-index: 2;
}

.group.group--full.group--event-group
.ptah-event-timeline__marker::before {
  background-color: currentColor;
  content: "";
  height: 1.25rem;
  left: 50%;
  -webkit-mask: var(--timeline-marker-icon) center / contain no-repeat;
  mask: var(--timeline-marker-icon) center / contain no-repeat;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.25rem;
}

/* Activity card. */
.group.group--full.group--event-group
.ptah-event-timeline__content {
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--timeline-border);
  border-left: 0.3rem solid var(--timeline-type);
  border-radius: 0.75rem;
  box-shadow: 0 0.4rem 1.2rem rgb(45 34 66 / 6%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  grid-column: 3;
  justify-content: center;
  min-width: 0;
  padding: 0.85rem 1.05rem;
  transition: border-color 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.group.group--full.group--event-group
.ptah-event-timeline__item:hover .ptah-event-timeline__content {
  border-bottom-color: #d9d2e4;
  border-right-color: #d9d2e4;
  border-top-color: #d9d2e4;
  box-shadow: 0 0.7rem 1.5rem rgb(45 34 66 / 9%);
  transform: translateY(-1px);
}

.group.group--full.group--event-group
.ptah-event-timeline__content h3 {
  color: var(--timeline-ink) !important;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
  text-shadow: none !important;
}

.group.group--full.group--event-group
.ptah-event-timeline__content p {
  color: var(--timeline-muted) !important;
  font-size: 0.94rem;
  line-height: 1.45;
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 47.999rem) {
  .group.group--full.group--event-group .ptah-event-timeline {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    margin-top: 2rem;
    padding: 1.1rem 0.9rem 1.25rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading {
    align-items: flex-start;
    margin-bottom: 1.35rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading h2 {
    font-size: 1.45rem;
    min-height: 2.55rem;
    padding-left: 3.1rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading h2::before {
    left: 0.6rem;
    top: 0.52rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading::before {
    height: 2.55rem;
    width: 2.55rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading h2::after {
    font-size: 0.84rem;
    max-width: 13rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading > span {
    font-size: 0.75rem;
    margin-top: 0.2rem;
    padding: 0.52rem 0.66rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__list {
    gap: 1rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__list::before {
    bottom: 2.4rem;
    left: 1.28rem;
    top: 1.28rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__item {
    align-items: start;
    column-gap: 0.8rem;
    grid-template-areas:
      "marker date"
      "marker content";
    grid-template-columns: 2.55rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
    row-gap: 0.45rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__date {
    align-items: baseline;
    display: flex;
    gap: 0.5rem;
    grid-area: date;
    padding: 0.15rem 0 0;
    text-align: left;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__date strong,
  .group.group--full.group--event-group
  .ptah-event-timeline__date span {
    display: inline;
    margin: 0;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__marker {
    align-self: start;
    grid-area: marker;
    height: 2.55rem;
    width: 2.55rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__content {
    grid-area: content;
    min-height: 4.4rem;
    padding: 0.8rem 0.9rem;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 25rem) {
  .group.group--full.group--event-group
  .ptah-event-timeline__heading {
    flex-wrap: wrap;
  }

  .group.group--full.group--event-group
  .ptah-event-timeline__heading > span {
    margin-left: 3.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .group.group--full.group--event-group
  .ptah-event-timeline__content {
    transition: none;
  }
}
