.view.comics-overview > header .comics-browser-nav > .comics-listing-controls {
  display: grid;
  flex: 0 0 3rem;
  grid-template-rows: repeat(2, 1fr);
  border-inline-start: 5px solid #650f47;
}

.view.comics-overview > header .comics-browser-nav > li:has(+ .comics-listing-controls) > a {
  border-inline-end: 0;
}

.comics-listing-mode {
  display: grid;
  place-items: center;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffeecc;
  cursor: pointer;
}

.comics-listing-mode + .comics-listing-mode {
  border-top: 4px solid #650f47;
}

.comics-listing-mode[aria-pressed="true"],
.comics-listing-mode:hover {
  background-color: #292929;
  box-shadow: inset 0 0 8px #000;
}

.comics-listing-mode:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}

.comics-listing-mode::before {
  box-sizing: border-box;
  width: 20px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 5px;
  content: "";
}

.comics-listing-mode--minimal::before {
  background:
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.comics-listing-unwrapped-rows {
  display: contents;
}

/* Align the grid with the tabs and keep empty states outside the grid. */
.view.comics-overview.comics-listing--minimal > .views-rows:has(> .views-row) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.view.comics-overview.comics-listing--minimal > .views-rows > .views-row {
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* An odd final card spans both columns and inherits the Classic proportions. */
.comics-listing--minimal > .views-rows > .views-row:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.comics-listing--minimal > .views-rows > .views-row:not(:last-child:nth-child(odd)) .eck-entity.type--comics.bundle--request.view-mode--teaser .container > a .request-teaser-art {
  aspect-ratio: 4;
}

.comics-listing--minimal > .views-rows > .views-row:not(:last-child:nth-child(odd)) .request-teaser-credit .request-teaser-name {
  font-size: clamp(0.6875rem, 1.3vw, 1rem);
}

@media (max-width: 768px) {
  .view.comics-overview.comics-listing--minimal > .views-rows:has(> .views-row) {
    grid-template-columns: minmax(0, 1fr);
  }

  .view.comics-overview > header .comics-browser-nav:has(> .comics-listing-controls) > li > a {
    font-size: clamp(0.625rem, 2.4vw, 1.25rem);
  }

  .view.comics-overview > header .comics-browser-nav > .comics-listing-controls {
    flex-basis: 2rem;
  }
}

/* Match the Comics Archive search panel and keep actions below the filters. */
#views-exposed-form-comics-overview-tournaments-past {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  margin-block: 0 20px;
  padding: 1rem;
  border: 2px solid #650f47;
  border-radius: 10px;
  background-color: #4d4d4d;
  color: #ffeecc;
}

#views-exposed-form-comics-overview-tournaments-past .form-item {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

#views-exposed-form-comics-overview-tournaments-past .form-item-tournament-search {
  flex-basis: 16rem;
}

#views-exposed-form-comics-overview-tournaments-past label {
  display: block;
  margin-bottom: 0.25rem;
  font-family: Exo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

#views-exposed-form-comics-overview-tournaments-past :is(.form-text, .form-select) {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.6rem;
  border: 5px solid #650f47;
  border-radius: 10px;
  background-color: #96999c;
  box-shadow: none;
  color: #000;
}

#views-exposed-form-comics-overview-tournaments-past .form-actions {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

#views-exposed-form-comics-overview-tournaments-past .form-actions .form-submit {
  appearance: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 5px 12px;
  border: 0;
  border-radius: 10px;
  background-color: #650f47;
  box-shadow: none;
  color: #ffeecc;
  cursor: pointer;
  font-family: Exo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.35;
}

#views-exposed-form-comics-overview-tournaments-past .form-actions .form-submit:is(:hover, :focus-visible) {
  background-color: #7a1a55;
  color: #fff;
  outline: 2px solid #b03060;
  outline-offset: 1px;
}
