.wrapper {
  margin: 0 auto;
  max-width: 1000px;
}

header {
  padding: 1rem;
  border-bottom: 1px solid rgb(42, 49, 64);
}
header .wrapper {
  display: flex;
  gap: 1rem;
}
header h1 {
  display: none;
}
header #logo img {
  height: 60px;
}
header #logo img:hover {
  cursor: pointer;
}
header #filters {
  display: flex;
  align-items: baseline;
  flex-grow: 1;
  gap: 1rem;
}
header #filters * {
  flex-grow: 1;
  margin-bottom: 0;
}
header #filters select {
  flex-grow: 0;
  width: 10rem;
  text-transform: capitalize;
}
header #filters #form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
header #filters #form div {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}
header #filters #submit {
  flex-grow: 0;
}

header #menu {
  margin-bottom: 0;
}
header #menu summary {
  display: flex;
  align-items: center;
  font-size: 2rem;
  padding-bottom: 1rem;
}
header #menu summary:after {
  display: none;
}

#content {
  padding: 1rem;
}

#content h2:not(:first-child) {
  margin-top: 3rem;
}

.groups {
  columns: 4;
}
.group {
  break-inside: avoid;
}
.group header h3 {
  margin-bottom: 0;
}

#response {
  position: relative;
  min-height: 4.5rem;
  padding: 1rem;
  border-radius: var(--pico-border-radius);
  background: var(--pico-code-background-color);
}
#response #json {
  color: var(--pico-code-color);
  font-weight: var(--pico-font-weight);
  line-height: initial;
}

ul.controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
ul.controls li {
  display: inline-block;
}
ul.controls li button.secondary {
  font-size: 0.9rem;
  padding: 0.4rem;
  padding-right: 0.7rem;
}

footer {
  text-align: center;
  font-size: 0.9rem;
}
footer a {
  color: grey
}

/* SUMMARY TABLES */

.summary-tables {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.summary-section h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--pico-primary);
}

.summary-section h3 .count {
  font-weight: normal;
  font-size: 0.9rem;
  color: var(--pico-muted-color);
}

.summary-section table {
  margin-bottom: 0;
}

.summary-section table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-section table td {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.9rem;
  word-break: break-all;
}

.summary-section table tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.summary-section table tr.clickable-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.show-more-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.show-more-buttons button {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* DETAIL PANEL */

.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.detail-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  background: var(--pico-code-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  z-index: 101;
  display: flex;
  flex-direction: column;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  font-family: var(--pico-font-family-monospace);
  font-size: 0.9rem;
  color: var(--pico-primary);
}

.detail-header .close-btn {
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  line-height: 1;
  margin: 0;
}

.detail-content {
  padding: 1rem;
  overflow-y: auto;
  color: var(--pico-code-color);
  font-weight: var(--pico-font-weight);
  line-height: initial;
}

/* FORM VALIDATION */

div.error {
  padding: 1rem;
  background-color: #610f22;
  border: 1px solid var(--pico-form-element-invalid-border-color);
  border-radius: 5px;
}
div.error p {
  margin: 0;
  padding: 0;
  color: white;
}
