/* admin/css/pages/events.css — Events home (spec §3.2) and Create event. */

.ev-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ev-toolbar .field { margin: 0; }
.ev-search { flex: 1 1 220px; max-width: 360px; }
/* The sort closes the row at the content's right edge, level with the grid. */
.ev-sort { width: auto; min-width: 180px; margin-left: auto; }

@media (max-width: 560px) {
  .ev-search,
  .ev-sort {
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
}

.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.ev-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
  transition: background .18s var(--ease-ui, ease);
}
.ev-card:hover { background: var(--surface-hi); }

.ev-card-top { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ev-card-tile {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-hi);
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
}
.ev-card-id { flex: 1 1 auto; min-width: 0; }
.ev-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-card-code {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ev-card-chips .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* The status word, as in the workspace header (spec §3.3): lowercase,
   active green, inactive dim, deleted red. Capped so a long
   "inactive · preview 20" wraps instead of squeezing the event code. */
.ev-status {
  flex: 0 1 auto;
  max-width: 34%;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  text-transform: lowercase;
}
.ev-status-part { white-space: nowrap; }
.ev-status--active { color: var(--success); }
.ev-status--inactive { color: var(--text-dim); }
.ev-status--deleted { color: var(--danger); }

.ev-card-stats { display: flex; flex-wrap: wrap; gap: 24px; }
.ev-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ev-stat-value { font-size: 14px; font-weight: 600; }

.ev-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ev-card-note { margin: 0; font-size: 12px; color: var(--danger); }

.ev-start-preset[hidden] { display: none; }
.ev-start-preset { margin-left: 28px; max-width: 420px; }

/* Create event: a failed preset list says so, with Retry (final review B-M7). */
.ev-preset-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ev-preset-error[hidden] {
  display: none;
}

.ev-preset-error .field-error {
  margin: 0;
}
