header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 55px;
  z-index: 10;
  padding-inline: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

header .wpa-logo {
  position: fixed;
  bottom: 0;
  right: 0;
  transform: rotate(-30deg);
  pointer-events: none;
}

.container {
  display: flex;
  flex-direction: row;
  padding: 55px 2rem;
}

.sidebar {
  position: sticky;
  top: 60px;
  align-self: start;
  width: 250px;
  margin-right: 20px;
  padding: 10px;
  border: 1px solid rgb(var(--fg-rgb), 0.1);
  background: rgb(var(--fg-rgb), 0.1);
}

.filter-group {
  margin-bottom: 20px;
}

.pagination button {
  margin-right: 10px;
  padding: 5px 10px;
  background-color: var(--bg-accent);
  color: var(--fg-color);
  border: none;
  cursor: pointer;
}

.pagination button:hover {
  background-color: var(--bg-color);
}

.results-container {
  flex: 1;
  padding: 10px;
  border: 1px solid rgb(var(--fg-rgb), 0.1);
  background: rgb(var(--fg-rgb), 0.1);
}

.results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-info,
.clear-filters {
  width: 100%;
  text-align: center;
  margin: 1rem auto;
}

.loading {
  display: none;
  text-align: center;
  width: 100%;
  margin: 3rem auto;
}
.record-detail-container {
  /* .record-detail-container:has(.loading) { */
  background: repeating-linear-gradient(
    90deg,
    var(--bg-color) 0%,
    var(--bg-color) 1%,
    var(--bg-accent) 1%,
    var(--bg-accent) 2%
  );
  background-size: 500% 400%;

  animation: loading 30s linear infinite;
  background-position: 50vw;
}

@keyframes loading {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -100% 0;
  }
}
.htmx-request .loading {
  display: block;
}

.mini-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-button {
  height: min(50px, 100%);
  padding: 9px;
  margin-top: 1rem;
  /* aspect-ratio: 1 / 1; */
  background: var(--bg-accent);
  color: var(--fg-accent);
  border: 1px solid vaR(--fg-accent);
  cursor: pointer;
  transition: 250ms;
  align-self: center;
  justify-self: center;
}

.detail-button:hover {
  background: var(--bg-color);
  color: var(--fg-color);
}

.record-card {
  position: relative;
  border: 1px solid rgb(var(--fg-rgb), 0.1);
  background: rgb(var(--fg-rgb), 0.1);

  & h2,
  .starter-text {
    margin: 0;
  }
}
.highlight {
  background: var(--bg-accent);
  color: var(--fg-accent);
  padding: 0 3px;
  line-height: calc(1rem + 9px);
  border: 1px solid rgba(var(--fg-rgb), 0.5);
}
.record-card .fg {
  background: linear-gradient(
    to right,
    var(--bg-color),
    rgb(var(--bg-rgb), 0.9)
  );
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.record-card .bg {
  z-index: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.record-card .bg img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.record-detail-container {
  max-height: 0;
  overflow: auto;
  transition: max-height 0.3s ease;
}

.record-detail-container.expanded {
  margin-top: 1rem;
  max-height: 1000px;
}

.record-detail {
  /* max-width: min(800px, 60vw); */
  margin: 0 auto;
  padding: 1rem;
  background-color: var(--bg-accent);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
.title-link {
  margin: 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.5rem;
  & svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--fg-color);
    height: 2rem;
    opacity: 0.33;
  }
  &:hover {
    color: var(--fg-accent);
    & svg {
      fill: var(--fg-accent);
      opacity: 0.66;
    }
  }
}
.record-detail img {
  max-width: min(666px, 95%);
  width: 95%;
  margin: 1rem auto;
}

.record-metadata {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background-color: rgb(var(--fg-rgb), 0.3);
  /* border-radius: 4px; */
}

.record-content {
  margin: auto;
  max-width: min(666px, 66vw);
}
.record-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.record-classification {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f0f0f0;
  border-radius: 4px;
}

.record-classification h2 {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.record-classification ul {
  list-style-type: none;
  padding-left: 0;
}

.record-classification li {
  margin-bottom: 0.5rem;
}

.code {
  text-transform: uppercase;
}

.lang {
  text-transform: capitalize;
}

.list {
  display: inline-block;
  text-decoration: none;
  background: var(--fg-accent);
  border: 1px solid var(--bg-accent);
  padding: 3px;
  color: var(--bg-accent);
  transition: 250ms;
}

.list:hover {
  background: var(--fg-color);
  color: var(--bg-color);
}
.record-detail-container.expanded ~ .starter-text {
  display: none;
}

.record-detail-container:not(.expanded) ~ .starter-text {
  display: block;
}

input {
  width: 95%;
}

select {
  width: 100%;
}

select,
input {
  padding: 5px;
  margin: 5px auto 10px auto;
}

section {
  margin-block: 1rem;
}

.values {
  margin-top: 10px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.pagination-info {
  display: inline-block;
}

#single-record .record-detail {
  background: var(--bg-color);
}

.arrow-link {
  --arrow-width: 80px;
  position: absolute;
  top: calc(var(--arrow-width) * -0.5);
  /* left: 0; */
  /* right: calc((10px + var(--arrow-width)) * -0.5); */
  /* left: calc((10px + var(--arrow-width)) * -0.5); */
  top: 3px;
  transform: scale(0.25);
  transform-origin: top right;
  right: 3px;
  width: var(--arrow-width);
  height: 80px;
  cursor: pointer;
  border: 0;
  background: transparent;
  transition: 333ms;
  --arrow-color: var(--fg-color);
  &:hover {
    background: transparent;
    --arrow-color: var(--bg-color);
    & p {
      opacity: 0.9999;
    }
  }
}

.arrow {
  position: absolute;
  top: calc(50% - 5px);
  width: 90%;
  height: 10px;
  background-color: var(--arrow-color);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.arrow::after,
.arrow::before {
  content: "";
  position: absolute;
  width: 60%;
  height: 10px;
  left: -8px;
  background-color: var(--arrow-color);
}

.arrow::after {
  top: -12px;
  transform: rotate(-45deg);
}

.arrow::before {
  top: 12px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  transform: rotate(45deg);
}
.arrow-link p {
  transform: scale(4);
  transform-origin: right;
  text-align: right;
  transition: 333ms;
  opacity: 0.0001;
  display: flex;
  position: relative;
  z-index: 10;
  /* color: var(--bg-color); */
  justify-content: end;
  align-items: center;
}
.noUi-target {
  margin: 10px auto;
  padding-inline: 10px;

  width: 90%;
}

.noUi-connect {
  background: var(--fg-accent);
}
