@use "../../../../styles/abstracts/variables";
@use "../../../../styles/abstracts/mixins";

.event {
  @include mixins.pageBase;
  width: 100%;
  overflow-x: hidden;
}

.event__inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ================= HERO ================= */

.event__hero {
  position: relative;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;

  &Image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
  }

  &Overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(0,0,0,0.4),
      rgba(0,0,0,0.85)
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.8rem;

    h1 {
        font-size: 2rem !important;
        font-weight: 800 !important;
      }

    p {
      opacity: 0.85;
      font-size: 0.9rem;
    }
  }
}

.soldOutBadge {
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 0.5rem;
}

/* ================= META ================= */

.event__metaGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.2rem;

  span {
    background: #121214;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    font-size: 0.78rem;
    color: #fff;
    display: flex;
    gap: 8px;
    align-items: center;
    border: 1px solid variables.$col-border-lining;
  }
}

.metaDanger {
  border-color: #dc2626 !important;
  color: #fca5a5;
}

/* ================= DESCRIPTION ================= */

.event__description {
  font-size: 0.82rem;
  line-height: 2;
  opacity: 0.9;
  margin-bottom: 1.8rem;
}

/* ================= TABLE ================= */

.eventTable {
  margin-top: 0.5rem;

  &__content {
    border: 1px solid variables.$col-border-lining;
    border-radius: 6px;
    // background: #0f0f10;
  }

  &__tableWrapper {
    overflow-x: auto;
  }

  &__table {
    display: grid;
    grid-template-columns: 160px 200px 220px 140px 160px;
    min-width: 1000px;
    padding: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: variables.$col-active-btn-bg;
  }

  &__childrenItem {
    display: grid;
    grid-template-columns: 160px 200px 220px 140px 200px;
    min-width: 1000px;
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: #fff;

    // &:hover {
    //   background: rgba(255,255,255,0.03);
    // }
  }

  /* ================= SKELETON ================= */

  &__skeleton {
    padding: 1rem;
    transition: opacity 0.3s ease;
  }

  &__skeletonRow {
    display: grid;
    grid-template-columns: 160px 200px 220px 140px 160px;
    gap: 12px;
    margin-bottom: 0.8rem;
  }

  &__skeletonCell {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(
      90deg,
      #1e1e1e 25%,
      #2a2a2a 37%,
      #1e1e1e 63%
    );
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
  }
}

.fadeOut {
  opacity: 0;
  pointer-events: none;
}

@keyframes shimmer {
  0% { background-position: -200% 0 }
  100% { background-position: 200% 0 }
}

/* ================= PAGINATION ================= */

.attend__pagination {
  margin-top: 1.6rem;
}
