
/* --- General --- */

html {
  height: calc(100vh - 32px);
}

body {
  height: calc(100% - 32px);
  width: 100%;
  background-color: Lavender;
  box-sizing: content-box;
}

ul {
  padding: 0 1rem;
  margin: 0;
}

li {
  list-style: none;
  margin-block: 0.5rem;
}

main {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.add-item-btn {
  position: absolute;
  top: 3rem;
  right: 1rem;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.add-item-btn .text{
  display: block;
  width: 0rem;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 2px;
  transition: all 200ms ease-in-out;
}
.add-item-btn:hover .text{
  width: 9rem;
}

.loader.hidden {
  display: none;
}
.loader {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  /* backdrop-filter: blur(1px); */
  display: flex;
  justify-content: center;
  align-items: center;
}
.loader::after {
  content: "";
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: transparent;
  border: 3px solid black;
  border-top: none;
  border-bottom: none;
  animation: loader-spin 1s ease-in-out infinite, 
             loader-width 0.6s ease-in-out infinite alternate both;
}

.skip-link.screen-reader-text {
  display: none;
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Search container --- */

.search-container {
  width: 32rem;
  position: relative;
}

.search-bar {
  display: flex;
  margin-block: 1rem;
  position: relative;
}

.search-bar input {
  flex-grow: 1;
  border-radius: 0 5px 5px 0;
  border: 1px solid black;
  font-size: 1.3rem;
  padding: 5px;
}

.search-bar #search-btn {
  content: "\2026"; /* ascii code for the ellipsis character */
  border: 1px solid black;
  border-radius: 5px 0 0 5px;
  border-right: navajowhite;
  font-size: 1.3rem;
  cursor: pointer;
  width: 2.5rem;
  padding: 5px;
}

.search-bar #reset-btn {
  position: absolute;
  top: 0;
  left: -5rem;
  height: 100%;
  font-size: 1.2rem;
  aspect-ratio: 1 /1;
  border: 1px solid black;
  border-radius: 5px;
}

.search-params {
  display: flex;
  min-height: 2rem;
  flex-wrap: wrap;
}
.search-params .row {
  width: 100%;
  display: flex;
  height: 2rem;
  margin-block: 0.5rem;
}
.search-params .row.attributes{
  gap: calc(2rem + 5px);
}

.search-params select {
  min-width: 5rem;
  padding-inline: 0.5rem;
  width: 50%;
}
.search-params .row.location{
  gap: calc(0.5rem + 5px);
}
.search-params .row.location input{
  width: 25%;
  /* gap: 2rem; */
}



/* --- Items grid --- */

h2.info-title {
  margin-bottom: 3rem;
}

/* --- Items grid --- */

main .items-grid {
  display: flex;
  gap: calc(1rem + 10px);
  flex-wrap: wrap;
  max-width: 80%;
  padding-bottom: 3rem;
}

main .items-grid .item {
  width: 16rem;
  height: 24rem;
  border: 1px solid black;
  padding: 0.5rem;
  border-radius: 5px;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  text-decoration: none;
  color: black;
  background: white;
  transition: 300ms all ease-in-out;
  overflow-y: scroll;
}
main .items-grid .item:hover {
  transform: scale(1.03);
}

.item h5 {
  margin-block: 0.5rem;
  font-size: 1.1rem;
}
.item.catalog-number {
  font-size: 0.9rem;
}

.item i {
  font-style: normal;
  background-color: yellow;
}

.item .featured-image-placeholder {
  height: 10rem;
  width: 100%;
  background-color: #ccc;
  border-radius: 5px;
}
.item .featured-image {
  height: 10rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 5px;
}

dialog#xlsx-modal {
  margin-top: 50vh;
  transform: translateY(-50%);
  min-width: 20%;
}
dialog#xlsx-modal h2 {
  margin-top: 0;
}
dialog#xlsx-modal .columns {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}
dialog#xlsx-modal .columns .col{
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
}
dialog#xlsx-modal .buttons {
  display: flex;
  justify-content: space-around;
}

@keyframes loader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes loader-width {
  0% { border-width: 1px; }
  100% { border-width: 8px; }
}

.buttons-menu {
  position: fixed;
  display: flex;
  flex-direction: column;
  text-align: end;
  top: 3rem;
  left: 1rem;
  gap: 1rem;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 10px 5px;
  border-radius: 5px;
}

.item-page img#featured-image {
  max-width: 300px;
  max-height: 300px;
} 

.item-page .list {
  width: 60%;
  margin-bottom: 3rem;
}
.item-page .list p {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted black;
}
.item-page .list #images {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-block: 5px;
}
.item-page .list #images img{
  max-height: 7rem;
  max-width: 7rem;
  cursor: pointer;
}
.item-page .list p span:first-of-type {
  background-color: rgba(0, 0, 0, 0.2);
  height: fit-content;
  padding-inline: 3px;
}
.item-page #desc {
  width: 80%;
  font-size: 1.1rem;
  line-height: 1.5rem;
}
.item-page #movements {
  white-space: pre;
}
.item-page #expanded-image-container {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
}
.item-page #expanded-image-container img {
  height: 80%;
}

@media print {
  .item-page .buttons-menu {
    display: none;
  }
}

.hidden {
 display: none !important;
}