/* Grid container: 3 equal columns with gap */
#root {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 20px;
  background-color: #e0e0e0;
  box-sizing: border-box;
}

.tvShowTitle {
  text-align: center;
  font-size: 2rem;
  margin: 16px;
  padding: 10px;
}

#showSelect {
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  height: 40px;
  box-sizing: border-box;
}

#showSearchInput {
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  height: 40px;
  box-sizing: border-box;
}

#showsContainer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 20px;
  background-color: #e0e0e0;
  box-sizing: border-box;
}

.show-card {
  border: 1px solid #000;
  padding: 16px;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: gray 2px 2px 5px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  /* remove margin; grid gap handles spacing */
  margin: 0 0 20px 0;
}

.show-link {
  font-size: 1.25rem;
  margin-bottom: 8px;
  text-align: center;
}

.show-info {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
  align-items: center;
}
.show-image {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 5px;
}

.show-summary {
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  margin: 12px 0 0 0;
  flex: 1 1 auto; /* allow summary to grow so cards match height */
}
.show-details {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
}

/* Card: fill the grid cell and use flex to make inner areas stretch */
.card {
  border: 1px solid #000;
  padding: 16px;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: gray 2px 2px 5px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  /* remove margin; grid gap handles spacing */
  margin: 0;
}

#backToShows {
  font-size: 1rem;
  margin-bottom: 8px;
  text-align: center;
}

h1 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  text-align: center;
}

/* Images fill card width with consistent height */
img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 5px;
}

p {
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  margin: 12px 0 0 0;
  flex: 1 1 auto; /* allow summary to grow so cards match height */
}

a {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
}

/* Responsive breakpoints */
@media (max-width: 900px) {
  #root {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  #root {
    grid-template-columns: 1fr;
  }
}

/* Controls (select + search) styling — inline, uniform appearance */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px 0 20px;
  box-sizing: border-box;
}

.controls select,
.controls input[type="search"] {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  height: 40px;
  box-sizing: border-box;
}

.controls select {
  min-width: 220px;
}

.controls input[type="search"] {
  min-width: 260px;
}

#searchCount {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}
