/* --------------------------------------------------
   GLOBAL LAYOUT
-------------------------------------------------- */

body {
  font-family: system-ui, sans-serif;
  max-width: 900px;
  margin: 20px auto;
  padding: 0 10px;
}

h1 {
  text-align: center;
}

section {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

form {
  margin-top: 10px;
}

input,
select,
button {
  margin: 3px;
  padding: 6px 8px;
}

/* --------------------------------------------------
   EVENT CARD
-------------------------------------------------- */

.event-card {
  border: 1px solid #ddd;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  display: block;
}

/* LINE 1 + LINE 2 */
.event-line,
.event-line-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

/* STATUS BADGE INLINE */
.status-badge-inline {
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.status-badge-inline.pending {
  background: #fbc02d;
  color: #000;
}

.status-badge-inline.on {
  background: #2e7d32;
}

/* LOCATION LINK */
.event-location-link {
  font-weight: 600;
  color: #1976d2;
  text-decoration: none;
  flex-grow: 1;
}

.event-location-link:hover {
  text-decoration: underline;
}

/* DATE/TIME */
.event-datetime {
  color: #444;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* LINE 2 ELEMENTS */
.event-note {
  font-style: italic;
  color: #555;
  flex-grow: 1;
}

.event-players,
.event-min {
  white-space: nowrap;
  font-size: 0.9rem;
}

/* --------------------------------------------------
   BUTTONS
-------------------------------------------------- */

.inline-vote {
  margin: 0;
}

.vote-button {
  background: #1976d2;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.vote-button:hover {
  background: #0d47a1;
}

.danger {
  background: #c62828;
  color: white;
}

.small-delete {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.delete-inline {
  margin: 0;
}

/* --------------------------------------------------
   NOTES
-------------------------------------------------- */

.note {
  font-style: italic;
  color: #555;
}

/* --------------------------------------------------
   MANAGE LOCATIONS
-------------------------------------------------- */

.location-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* --------------------------------------------------
   COLLAPSIBLE PAST GAMES
-------------------------------------------------- */

.collapsible-header {
  cursor: pointer;
  user-select: none;
}

.collapsible-content {
  display: none;
  margin-top: 10px;
}

/* --------------------------------------------------
   MOBILE OPTIMIZATION — NEW VERSION
-------------------------------------------------- */

@media (max-width: 600px) {

  .event-card {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* LINE 1 becomes stacked */
  .event-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .event-location-link {
    width: 100%;
    font-size: 1rem;
  }

  .event-datetime {
    width: 100%;
    font-size: 0.95rem;
    color: #555;
  }

  /* Full-width button */
  .inline-vote {
    width: 100%;
  }

  .vote-button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
  }

  /* LINE 2 stacks cleanly */
  .event-line-2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 6px;
  }

  .event-note {
    width: 100%;
    font-size: 0.95rem;
  }

  .event-players,
  .event-min {
    font-size: 0.9rem;
  }
}
