/**
 * Eventive WP Plugin - Event List Styles
 * 
 * Strategy:
 * - Use relative units (em/rem/%) for responsive scaling
 * - Avoid opinionated font-family; inherit from WordPress theme
 * - Use WordPress-style class names for theme compatibility (e.g. .entry-title)
 * - Apply Eventive-specific default styles scoped under .event-schedule-list
 */

/* General Styling for Events List */
.event-list-item {
    display: flex;
    flex-direction: row; /* Align items side-by-side */
    align-items: stretch; /* Align items to stretch */
    justify-content: space-between; /* Distribute items evenly across the row */
    border-radius: 12px;
    border: 1px solid #3c3c3c;
    padding: 1.5em;
    margin-bottom: 1.5em;
    background-color: var(--theme-secondary-background-color, #f3f3f3);
    gap: 10px; /* Add consistent spacing between items */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
}

/* Event Labels */
.event-label {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 6px 6px 0;
  font-weight: 600;
  border-radius: 16px;
  text-transform: uppercase;
  background-color: #ccc;
  color: #3f3f3f;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.event-list-name.entry-title {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: var(--theme-primary-text-color, #111111);
}

.event-list-time {
    font-size: 1em;
    font-weight: 500;
    color: var(--theme-secondary-text-color, #333333);
    margin: 0.4em 0;
}

.event-list-description {
    font-style: italic;
    font-size: 0.95em;
    color: var(--theme-tertiary-text-color, #666666);
}


.event-favorite-icon {
    position: absolute;
    right: 6em;
    top: 1.5em;
    font-size: 1.2em;
    color: #888;
}

/* Poster Styling */
.event-list-item .poster {
    flex-shrink: 0; /* Prevent the poster from shrinking */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow for the poster */
    max-height: 150px;
}

/* Content Styling */
.event-list-item .content-1  {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    text-align: left;
    max-width: calc(100% - 10rem);
    margin-left: 50px;
    flex: 1;
} /* Adjust width to account for poster */

/* Content Styling */
.event-list-item .content-2  {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    text-align: left;
}

/* Time and Title Styling */
/* (Legacy styles for .event-list-time, .event-list-description now overridden above) */



/* Responsive Adjustments for Tablets */
@media (max-width: 768px) {
    .event-list-item {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center align items */
        text-align: center; /* Center content */
    }

    .event-list-item .poster {
        max-height: 200px; /* Adjust max height for better visibility */
        max-width: 100%; /* Prevent overflow */
        margin-bottom: 16px; /* Add spacing below the poster */
    }

    .event-list-item .content {
        text-align: center; /* Center text for content */
    }
}

/* Responsive Adjustments for Small Screens */
@media (max-width: 400px) {
    .event-list-item {
        flex-direction: column; /* Stack items */
        align-items: center; /* Center-align items */
    }

    .event-list-item .poster {
        width: 100%; /* Full width for small screens */
        margin-bottom: 16px; /* Add spacing below the image */
    }

    .event-list-item .content h3 {
        font-size: 1.2em; /* Slightly smaller font size for titles */
        margin-bottom: 8px;
    }

    .event-list-item .content p {
        font-size: 0.9em; /* Slightly smaller font size for paragraphs */
    }

}

.event-schedule-list * {
    font-family: inherit;
    box-sizing: border-box;
}

.event-film-list {
  margin-top: 12px;
  margin-bottom: 12px;;
}

/* Styling for multiple film titles under an event */
.events-film-title {
  display: inline-block;
  background-color: #e6e6e6;
  color: #333;
  font-size: 0.85em;
  padding: 4px 8px;
  margin: 4px 6px 0 0;
  border-radius: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: capitalize;
}

.events-film-title:hover {
  background-color: #d1d1d1;
}

/* Grid container */
#event-schedule-list-container.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  #event-schedule-list-container.event-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #event-schedule-list-container.event-grid {
    grid-template-columns: 1fr;
  }
}

/* Grid card */
.event-grid-card {
  position: relative;
  aspect-ratio: 1 / 1; /* keeps them square */
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Media background */
.event-grid-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

/* Info block */
.event-grid-info {
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
  padding: 1rem;
}

.event-grid-time {
  font-size: 0.8rem;
  margin: 0 0 0.25rem 0;
  opacity: 0.9;
}

.event-grid-title {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.event-grid-tags {
  margin-top: 0.25rem;
}

.event-label {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 3px;
  font-size: 0.75rem;
  margin: 0 0.25rem 0.25rem 0;
}

/* Ticket button */
.event-grid-ticket {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
}

.event-grid-ticket .eventive-ticket-button {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  background: #ff3366;
  color: #fff;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.event-grid-ticket .eventive-ticket-button:hover {
  background: #e02e5b;
}