/*
 * Events Page Styles
 * Card grid for Vintages tasting events
 */

/* ===== Filters Extras =====
 * The events filter panel reuses .filters-panel / .filter-toggle-btn /
 * .filter-select / .checkbox-dropdown from components/_filters.css. These
 * rules add the event-specific pieces: date chips, custom-date row, and a
 * full-width sold-out toggle.
 */

.filter-group-full {
  display: block;
  margin-bottom: var(--space-md);
}

.events-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.events-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  border-radius: 999px;
  font-size: var(--font-size-xs);
  background: var(--color-bg);
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.events-chip:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

.events-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.events-chip:has(input[type="radio"]:checked) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.events-custom-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.events-custom-date {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.events-custom-date .filter-select {
  min-width: 140px;
}

.filter-group-cities {
  grid-column: 1 / -1;
}

.filter-group-toggle {
  display: flex;
  align-items: end;
}

.events-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
  height: 32px;
}

.events-toggle input[type="checkbox"] {
  margin: 0;
}

/* ===== Notification Toggle ===== */
.events-notification-toggle {
  margin-bottom: var(--space-xl);
}

.btn-notification-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-notification-toggle:hover {
  border-color: var(--color-border-hover);
}

.notification-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.notification-checkbox.checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ===== Events Grid ===== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

/* ===== Event Card ===== */
.event-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}

.event-card:hover {
  border-color: var(--color-border-hover);
}

.event-card.sold-out {
  opacity: 0.6;
}

.event-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface);
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-xl);
}

.event-card-body h2 {
  font-size: var(--font-size-md);
  font-weight: 600;
  margin: 0 0 var(--space-md) 0;
  line-height: 1.3;
}

/* ===== Event Meta ===== */
.event-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  flex: 1;
}

.event-date {
  font-weight: 500;
  color: var(--color-text-light);
}

/* ===== Event Description ===== */
.event-description {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.event-description.collapsed {
  max-height: 4.8em; /* ~3 lines */
}

.event-description:not(.collapsed) {
  max-height: none;
}

.event-description p {
  margin: 0;
  white-space: pre-line;
}

.btn-event-expand {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 0;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  text-decoration: none;
}

.btn-event-expand:hover {
  text-decoration: underline;
}

/* ===== Event Footer ===== */
.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.event-price {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}
