/* Skeleton styles for loading */
event-card {
  display: block;
  width: 100%;
  max-width: 560px;
  position: relative;
}

event-card:not(:defined) {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  /* Hide content while loading */
  color: transparent;
  min-height: 500px;

  /* Skeleton simulation */
  background-image:
    /* Image placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Category label placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Price placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Title placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Detail placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Description lines */
    linear-gradient(#f5f5f5, #f5f5f5),
    linear-gradient(#f5f5f5, #f5f5f5),
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Button placeholder */
    linear-gradient(#f5f5f5, #f5f5f5);

  background-repeat: no-repeat;

  background-size:
    /* Image */
    100% 300px,
    /* Category */
    100px 14px,
    /* Price */
    100px 14px,
    /* Title */
    80% 24px,
    /* Detail */
    150px 16px,
    /* Desc 1 */
    90% 14px,
    /* Desc 2 */
    95% 14px,
    /* Desc 3 */
    60% 14px,
    /* Button */
    120px 20px;
    
  background-position:
    /* Image */
    0 0,
    /* Category */
    16px 316px,
    /* Price */
    444px 316px,
    /* Title */
    16px 342px,
    /* Detail */
    16px 378px,
    /* Desc 1 */
    16px 406px,
    /* Desc 2 */
    16px 428px,
    /* Desc 3 */
    16px 450px,
    /* Button */
    16px 534px;
}

/* Horizontal layout skeleton */
event-card[layout="horizontal"]:not(:defined) {
  min-height: 200px;
  max-width: 100%;

  background-image:
    /* Category label placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Price placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Title placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Detail row placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Description lines */
    linear-gradient(#f5f5f5, #f5f5f5),
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Image on right */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Button placeholder */
    linear-gradient(#f5f5f5, #f5f5f5);

  background-size:
    /* Category */
    80px 14px,
    /* Price */
    120px 22px,
    /* Title */
    60% 20px,
    /* Detail row */
    300px 16px,
    /* Desc 1 */
    calc(100% - 248px - 40px) 14px,
    /* Desc 2 */
    calc(100% - 248px - 60px) 14px,
    /* Image on right */
    248px 136px,
    /* Button */
    80px 16px;

  background-position:
    /* Category */
    16px 16px,
    /* Price */
    calc(100% - 280px) 16px,
    /* Title */
    16px 46px,
    /* Detail */
    16px 82px,
    /* Desc 1 */
    16px 110px,
    /* Desc 2 */
    16px 132px,
    /* Image */
    calc(100% - 264px) 82px,
    /* Button */
    16px 170px;
}

@media (max-width: 767px) {
  event-card[layout="horizontal"]:not(:defined) {
    min-height: 500px;
    /* Use vertical skeleton on mobile */
    background-image:
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5);

    background-size:
      100% 300px,
      100px 14px,
      100px 14px,
      80% 24px,
      150px 16px,
      90% 14px,
      95% 14px,
      60% 14px,
      120px 20px;

    background-position:
      0 0,
      16px 316px,
      444px 316px,
      16px 342px,
      16px 378px,
      16px 406px,
      16px 428px,
      16px 450px,
      16px 534px;
  }
}

/* Component styles */
.ec-card {
  background: #fff;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 100%;
  max-width: 560px;
  height: auto;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans, sans-serif);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}

.ec-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  pointer-events: none;
  z-index: 1;
  transition: border-color 0.2s ease;
}

.ec-card:hover::after {
  border-color: rgba(0, 0, 0, 0.15);
}

.ec-card * {
  text-decoration: inherit;
}

@media (min-width: 768px) {
  .ec-card {
    height: 100%;
  }
}
@media (min-width: 992px) {
  .ec-desc-wrapper {
    container-type: size;
  }
}

.ec-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
  position: relative;
  display: block;
  overflow: hidden;
}

.ec-image-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  z-index: 0;
}

.ec-image-sharp {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.ec-image.ec-past::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.35) 100%);
  z-index: 2;
  pointer-events: none;
}

.ec-image-labels {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 3;
}

.ec-past-event-label, .ec-sponsored-label {
  display: flex;
  height: 22px;
  padding: 4px 8px;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  font-family: var(--font-sans, sans-serif);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid #333;
}

.ec-past-event-label {
  background-color: #333;
  color: #FFF;
  border-radius: 4px;
}

.ec-sponsored-label {
  background-color: #FFF;
  color: #333;
  border-radius: 4px;
}

.ec-image-labels > :not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
}

.ec-image-labels > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}


.ec-description {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.ec-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.ec-category {
  color: #686868;
  font-family: var(--font-sans, sans-serif);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ec-pricing {
  display: flex;
  align-items: center;
  gap: 8px;
}


.ec-badge {
  border: 1px solid #006ED2;
  border-radius: 2px;
  padding: 5px 6px;
  font-weight: 800;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #333;
  white-space: nowrap;
}

.ec-price.ec-subscriber {
  color: #006ED2;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
}

.ec-divider {
  color: rgba(0, 0, 0, 0.15);
}

.ec-price.ec-regular {
  color: #333;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
}

.ec-crossed {
  text-decoration: line-through;
}

.ec-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body-text-color, #333);
  margin: 0;
}

.ec-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ec-detail {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ec-detail img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ec-detail span {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.428;
  color: #686868;
}

.ec-desc-wrapper {
  flex-grow: 1;
  width: 100%;
  overflow: hidden;
}

.ec-desc, .ec-sponsors {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.428;
  color: #686868;
  margin: 0;
  width: 100%;
}

.ec-desc {
  padding-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .ec-desc {
    -webkit-line-clamp: 6;
    line-clamp: 6;
  }
}

@container (height > 20px) {
  .ec-desc {
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }
}

@container (height > 40px) {
  .ec-desc {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@container (height > 60px) {
  .ec-desc {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@container (height > 80px) {
  .ec-desc {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

@container (height > 100px) {
  .ec-desc {
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

@container (height > 120px) {
  .ec-desc {
    -webkit-line-clamp: 6;
    line-clamp: 6;
  }
}

@container (height > 140px) {
  .ec-desc {
    -webkit-line-clamp: 7;
    line-clamp: 7;
  }
}

@container (height > 160px) {
  .ec-desc {
    -webkit-line-clamp: 8;
    line-clamp: 8;
  }
}

@container (height > 180px) {
  .ec-desc {
    -webkit-line-clamp: 9;
    line-clamp: 9;
  }
}

@container (height > 200px) {
  .ec-desc {
    -webkit-line-clamp: 10;
    line-clamp: 10;
  }
}

/* Horizontal layout */
.ec-card.ec-horizontal {
  flex-direction: row;
  max-width: 100%;
  max-height: none;
}

.ec-card.ec-horizontal .ec-description {
  flex: 1;
  min-width: 0;
  gap: 12px;
}

.ec-card.ec-horizontal .ec-desc-wrapper {
  container-type: normal;
}

.ec-card.ec-horizontal .ec-content-with-image {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ec-card.ec-horizontal .ec-text-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ec-card.ec-horizontal .ec-image {
  width: 248px;
  min-width: 248px;
  height: 136px;
  aspect-ratio: 248 / 136;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
}

.ec-card.ec-horizontal .ec-details {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.ec-card.ec-horizontal .ec-detail {
  flex-shrink: 0;
}

.ec-card.ec-horizontal .ec-labels {
  width: 100%;
}

.ec-card.ec-horizontal .ec-image-wrapper {
  display: block;
}

.ec-card.ec-horizontal .ec-desc {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Responsive: switch to vertical on mobile */
@media (max-width: 767px) {
  .ec-card.ec-horizontal {
    flex-direction: column;
    max-width: 560px;
  }

  /* Flatten nested containers so all items become direct flex children of .ec-description */
  .ec-card.ec-horizontal .ec-content-with-image {
    display: contents;
  }

  .ec-card.ec-horizontal .ec-text-content {
    display: contents;
  }

  /* Move image to top using order (before labels, title, etc.) */
  .ec-card.ec-horizontal .ec-image-wrapper {
    order: -1;
    display: block;
    width: calc(100% + 32px);
    margin: -16px -16px 0 -16px; /* Extend to card edges, overlapping description padding */
  }

  .ec-card.ec-horizontal .ec-image {
    width: 100%;
    min-width: auto;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 0;
  }

  /* Reset order for other elements to maintain proper sequence */
  .ec-card.ec-horizontal .ec-labels {
    order: 0;
    width: 100%;
  }

  .ec-card.ec-horizontal .ec-title {
    order: 1;
  }

  .ec-card.ec-horizontal .ec-details {
    order: 2;
    flex-direction: column;
  }

  .ec-card.ec-horizontal .ec-desc-wrapper {
    order: 3;
  }

  .ec-card.ec-horizontal .ec-sponsors {
    order: 4;
  }

  .ec-card.ec-horizontal .ec-buttons {
    order: 5;
  }
}

/* Wide layout */
.ec-card.ec-wide {
  flex-direction: row;
  max-width: 100%;
  max-height: none;
}

.ec-card.ec-wide .ec-image-wrapper {
  flex: 1;
  min-width: 0;
  display: block;
}

.ec-card.ec-wide .ec-image {
  width: 100%;
  height: 300px;
  aspect-ratio: auto;
  overflow: hidden;
}

.ec-card.ec-wide .ec-description {
  flex: 1;
  min-width: 0;
  gap: 12px;
}

/* Responsive: switch to vertical on mobile */
@media (max-width: 767px) {
  .ec-card.ec-wide {
    flex-direction: column;
    max-width: 560px;
  }

  .ec-card.ec-wide .ec-image-wrapper {
    width: calc(100% + 32px);
    margin: -16px -16px 0 -16px;
  }

  .ec-card.ec-wide .ec-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 0;
  }
}

/* Wide layout skeleton */
event-card[layout="wide"]:not(:defined) {
  min-height: 300px;
  max-width: 100%;

  background-image:
    /* Image on left */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Category label placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Price placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Title placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Detail row placeholder */
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Description lines */
    linear-gradient(#f5f5f5, #f5f5f5),
    linear-gradient(#f5f5f5, #f5f5f5),
    /* Button placeholder */
    linear-gradient(#f5f5f5, #f5f5f5);

  background-size:
    /* Image on left */
    50% 300px,
    /* Category */
    80px 14px,
    /* Price */
    120px 22px,
    /* Title */
    35% 20px,
    /* Detail row */
    40% 16px,
    /* Desc 1 */
    40% 14px,
    /* Desc 2 */
    38% 14px,
    /* Button */
    80px 16px;

  background-position:
    /* Image */
    0 0,
    /* Category */
    calc(50% + 16px) 16px,
    /* Price */
    calc(100% - 136px) 16px,
    /* Title */
    calc(50% + 16px) 46px,
    /* Detail */
    calc(50% + 16px) 82px,
    /* Desc 1 */
    calc(50% + 16px) 110px,
    /* Desc 2 */
    calc(50% + 16px) 132px,
    /* Button */
    calc(50% + 16px) 170px;
}

@media (max-width: 767px) {
  event-card[layout="wide"]:not(:defined) {
    min-height: 500px;
    /* Use vertical skeleton on mobile */
    background-image:
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5),
      linear-gradient(#f5f5f5, #f5f5f5);

    background-size:
      100% 300px,
      100px 14px,
      100px 14px,
      80% 24px,
      150px 16px,
      90% 14px,
      95% 14px,
      60% 14px,
      120px 20px;

    background-position:
      0 0,
      16px 316px,
      444px 316px,
      16px 342px,
      16px 378px,
      16px 406px,
      16px 428px,
      16px 450px,
      16px 534px;
  }
}

.ec-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 4px;
}

.ec-right-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ec-view-details {
  color: #006ED2;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.428;
  text-decoration: none;
  transition: font-weight 0.2s ease;
}

.ec-card:hover .ec-view-details {
  font-weight: 700;
}

.ec-calendar, .ec-bookmark {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ec-calendar img, .ec-bookmark img {
  width: 16px;
  height: 16px;
  fill: #333;
}

/* Happening Now styles */
.ec-card.ec-happening-now {
  border: 1px solid #B40404;
  box-sizing: border-box;
}

.ec-card.ec-happening-now:hover::after {
  border-color: #B40404;
}

.ec-happening-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ec-happening-ticker img {
  width: 16px;
  height: 16px;
}

.ec-happening-text {
  color: #B40404;
  font-family: var(--font-sans, sans-serif);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ec-card.ec-happening-now .ec-view-details {
  color: #B40404;
}

.ec-animAlertIcon{
     height: 16px;
     width: 16px;
     display: flex;
     align-items: center;
     justify-content: center;
     position: relative;
     flex-shrink: 0;
}
.ec-animAlertIcon:before{
    content: '';
    height: 16px;
    width: 16px;
    background: var(--icon-alert-light, #B40404);
    border-radius: 50%;
    animation: ec-animAlertIcon-pulsate 1s ease-out;
    animation-iteration-count: infinite;
    border: 4px solid var(--icon-alert-light, #B40404);
    position: absolute;
}
.ec-animAlertIcon:after{
    content: '';
    height: 8px;
    width: 8px;
    background: var(--icon-alert-light, #B40404);
    border-radius: 50%;
    position: absolute;
}
 @keyframes ec-animAlertIcon-pulsate{
     0%{
         transform:scale(0.1, 0.1);
         opacity:0
    }
     50%{
         opacity:1
    }
     100%{
         transform:scale(1.2, 1.2);
         opacity:0
    }
}
