/* BuyFilms filter bar */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px auto;
  max-width: 950px;
  padding: 0 16px;
  flex-wrap: wrap;
}

#brand-filter {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  padding: 8px 32px 8px 12px;
  border: 1px solid #2a2a2e;
  border-radius: 4px;
  background: #1a1a1e;
  color: #ffffff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

#brand-filter:hover {
  border-color: #444448;
}

#brand-filter:focus {
  outline: none;
  border-color: #6a9f6a;
}

#count-display {
  font-size: 14px;
  color: #888888;
}

/* Filtered state */
.films-table[data-brand] tr:not([data-brand]) {
  display: none;
}

.films-table[data-brand] tr[data-brand]:not([data-brand="all"]) {
  display: table-row;
}

.films-table[data-brand="all"] tr[data-brand] {
  display: table-row;
}

.films-table tr[hidden] {
  display: none;
}

/* Store sections with no visible rows */
.store-section:has(.films-table tr:not([hidden])) {
  display: block;
}

@media (max-width: 600px) {
  .filter-bar {
    margin: 16px auto;
    gap: 12px;
  }

  #brand-filter {
    font-size: 14px;
    padding: 6px 28px 6px 10px;
    width: 100%;
  }

  #count-display {
    width: 100%;
    margin-left: 0;
    padding-left: 12px;
  }
}

/* BuyFilms table styles */

.films-container {
  margin-top: 48px;
}

.store-section {
  margin-bottom: 48px;
}

.store-name {
  font-family: Roboto Condensed, ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #ffffff;
}

.films-table {
  width: 100%;
  border-collapse: collapse;
}

.films-table th {
  font-size: 14px;
  font-weight: 600;
  color: #888888;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2a2e;
}

.films-table td {
  font-size: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid #222228;
  vertical-align: middle;
}

.films-table tr:hover {
  background: #222228;
}

.films-table td a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: #444448;
  text-underline-offset: 2px;
}

.films-table td a:hover {
  text-decoration-color: #888888;
}

.films-table td:first-child {
  font-weight: 500;
}

.films-table td:nth-child(2) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #6a9f6a;
}

.films-table td:nth-child(3) {
  white-space: nowrap;
}

.films-table td:nth-child(4) {
  white-space: nowrap;
}

.films-table td:nth-child(5) {
  white-space: nowrap;
}

.films-table td:nth-child(6) a {
  font-size: 13px;
  color: #888888;
  text-decoration: underline;
  text-decoration-color: #444448;
}

.films-table td:nth-child(6) a:hover {
  color: #cccccc;
  text-decoration-color: #888888;
}

@media (max-width: 600px) {
  .films-container {
    margin-top: 24px;
  }

  .store-section {
    margin-bottom: 32px;
  }

  .store-name {
    font-size: 20px;
    margin: 0 0 12px;
  }

  .films-table th {
    font-size: 12px;
    padding: 6px 8px;
  }

  .films-table td {
    font-size: 14px;
    padding: 8px 8px;
  }

  .films-table td:nth-child(2) {
    font-size: 14px;
  }

  .films-table td:nth-child(6) a {
    font-size: 12px;
  }
}
