Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

11.5 KB
Raw Blame
@use "../../../styles/mixins.scss";

.eventCard {
  overflow: hidden;
  padding: 0 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  container-type: inline-size;
  min-width: 280px;

  &:hover {
    border-color: var(--mantine-color-gray-4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    .title {
      color: var(--mantine-color-primary-filled);
    }
  }

  &.isDraft {
    opacity: 0.75;
    border-style: dashed;

    &:hover {
      opacity: 1;
    }
  }

  &.isEnded {
    opacity: 0.6;

    &:hover {
      opacity: 0.8;
    }

    .image {
      filter: grayscale(50%);
    }
  }
}

.cardLink {
  display: flex;
  text-decoration: none;
  color: inherit;
  min-height: 140px;

  @include mixins.respond-below(md, true) {
    flex-direction: column;
    min-height: auto;
    position: relative;
  }
}

.imageContainer {
  position: relative;
  width: 200px;
  min-width: 200px;
  overflow: hidden;

  @include mixins.respond-below(md, true) {
    width: 100%;
    min-width: 100%;
    height: 140px;
  }
}

.image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.placeholderImage {
  &::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
  }
}

.imageOverlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 100%);
}

.placeholderOverlay {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.15) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

.statusBadge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--hi-radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);

  &.status-live {
    background: var(--mantine-color-green-6);
    color: var(--mantine-color-white);
  }

  &.status-onsale {
    background: var(--mantine-color-primary-filled);
    color: var(--mantine-color-white);
  }

  &.status-draft {
    background: rgba(255, 255, 255, 0.9);
    color: var(--mantine-color-gray-7);
    border: 1px dashed var(--mantine-color-gray-5);
  }

  &.status-ended,
  &.status-archived {
    background: rgba(0, 0, 0, 0.6);
    color: var(--mantine-color-white);
  }
}

.pulseDot {
  width: 6px;
  height: 6px;
  background: var(--mantine-color-white);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dateBadge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--mantine-color-white);
  border-radius: var(--hi-radius-sm);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dateDay {
  font-size: 18px;
  font-weight: 700;
  color: var(--mantine-color-dark-9);
  line-height: 1;
}

.dateMonth {
  font-size: 10px;
  font-weight: 600;
  color: var(--mantine-color-primary-filled);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.recurringBadge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--mantine-color-white);
  border-radius: var(--hi-radius-sm);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  color: var(--mantine-color-primary-filled);
}

.recurringLabel {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--mantine-color-primary-filled);
  font-weight: 500;
  padding-left: 6px;
  border-left: 1px solid var(--mantine-color-gray-3);
}

.content {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;

  @include mixins.respond-below(md, true) {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
  }
}

.contentMain {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--mantine-color-text);
  line-height: 1.3;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  margin-top: 2px;
}

.eventDate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mantine-color-text);
  font-weight: 500;
  white-space: nowrap;
}

.relativeDate {
  color: var(--mantine-color-dimmed);
  font-weight: 400;
}

.separator {
  color: var(--mantine-color-gray-4);
}

.location {
  color: var(--mantine-color-dimmed);
  @include mixins.ellipsis;
  max-width: 160px;
}

.footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.organizer {
  font-size: 12px;
  color: var(--mantine-color-dimmed);
  text-decoration: none;

  &:hover {
    color: var(--mantine-color-primary-filled);
    text-decoration: underline;
  }
}

.ticketStatus {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;

  &.ticket-available {
    background: var(--mantine-color-green-0);
    color: var(--mantine-color-green-8);
  }

  &.ticket-partial {
    background: var(--mantine-color-yellow-0);
    color: var(--mantine-color-yellow-8);
  }

  &.ticket-sold-out {
    background: var(--mantine-color-red-0);
    color: var(--mantine-color-red-7);
  }
}

.statsPanel {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 18px;
  background: var(--mantine-color-gray-0);
  border-radius: var(--hi-radius-md);
  flex-shrink: 0;

  @include mixins.respond-below(lg, true) {
    gap: 18px;
    padding: 10px 14px;
  }

  @include mixins.respond-below(md, true) {
    justify-content: space-around;
    padding: 12px;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: default;
  min-width: 75px;

  @include mixins.respond-below(lg, true) {
    min-width: 65px;
  }
}

.statValue {
  font-size: 18px;
  font-weight: 700;
  color: var(--mantine-color-text);
  line-height: 1;

  @include mixins.respond-below(lg, true) {
    font-size: 16px;
  }
}

.statValueRevenue {
  font-size: 18px;
  font-weight: 700;
  color: var(--mantine-color-green-7);
  line-height: 1;

  @include mixins.respond-below(lg, true) {
    font-size: 16px;
  }
}

.statLabel {
  font-size: 10px;
  color: var(--mantine-color-dimmed);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.menuButton {
  flex-shrink: 0;

  @include mixins.respond-below(md, true) {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}

.actionButton {
  color: var(--mantine-color-dimmed);

  @include mixins.respond-below(md, true) {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);

    &:hover {
      background: var(--mantine-color-white);
    }
  }

  &:hover {
    background: var(--mantine-color-gray-1);
    color: var(--mantine-color-text);
  }
}

.eventCardCompact {
  border: 0.5px solid var(--hi-color-border);
  border-radius: var(--hi-radius-card);
  overflow: hidden;
  background: var(--hi-color-white);
  transition: background-color 0.12s ease;
  container-type: inline-size;

  &:hover {
    background-color: var(--mantine-color-gray-0);

    .compactTitle {
      color: var(--mantine-color-primary-7);
    }
  }

  &.isDraft {
    .compactImage {
      opacity: 0.85;
    }
  }

  &.isEnded {
    .compactImage {
      filter: grayscale(60%);
    }
  }
}

.cardLinkCompact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  min-height: 76px;

  @container (max-width: 460px) {
    gap: 10px;
    padding: 10px;
  }
}

.compactThumb {
  position: relative;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: var(--hi-radius-sm);
  overflow: hidden;
  flex-shrink: 0;

  @container (max-width: 460px) {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}

.compactImage {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.compactDateBadge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  color: var(--mantine-color-white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.compactDateDay {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;

  @container (max-width: 460px) {
    font-size: 0.8125rem;
  }
}

.compactDateMonth {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;

  @container (max-width: 460px) {
    font-size: 0.5625rem;
  }
}

.compactContent {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compactPrimary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.compactTitle {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--hi-text);
  transition: color 0.12s ease;
  @include mixins.ellipsis;
  letter-spacing: -0.005em;
}

.compactRecurringIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hi-color-text-muted);
  flex-shrink: 0;
}

.compactMeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--hi-color-text-muted);
  line-height: 1.3;
}

.compactMetaItem {
  white-space: nowrap;
}

.compactLocation {
  @include mixins.ellipsis;
  max-width: 160px;
}

.compactDot {
  color: var(--hi-color-border);
}

.compactStatus {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.compactStatusDot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}

.compactStatus-success {
  color: var(--hi-color-success);
}

.compactStatus-warning {
  color: var(--hi-color-warning);
}

.compactStatus-danger {
  color: var(--hi-color-danger);
}

.compactStatus-muted {
  color: var(--hi-color-text-muted);
}

.compactTickets {
  font-weight: 500;
  white-space: nowrap;
}

.compactTickets-available {
  color: var(--hi-color-success);
}

.compactTickets-partial {
  color: var(--hi-color-warning);
}

.compactTickets-sold-out {
  color: var(--hi-color-danger);
}

.compactStats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;

  @container (max-width: 460px) {
    gap: 0;
  }
}

.compactStat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 64px;

  @container (max-width: 460px) {
    min-width: 0;

    &:not(:last-child) {
      display: none;
    }
  }
}

.compactStatValue {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hi-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.compactStatLabel {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hi-color-text-muted);
  margin-top: 2px;

  @container (max-width: 460px) {
    display: none;
  }
}

.compactMenuButton {
  flex-shrink: 0;
}