/* styles for item.html specifically, it also uses base stuff from style.ss */

.item-page {
  width: min(700px, 100%);
}

/* title bar */
.window-title .title-text {
  margin: 0;
  font: inherit;
}

/* the x to close the item and the picture */
.close {
  color: inherit;
  text-decoration: none;
  padding: 0 4px;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.close:hover,
.close:focus-visible {
  color: var(--pink-900);
}

/* body of the window */
.item-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* pictures */
.item-pictures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.item-pictures figure {
  margin: 0;
}

/* take default styling off button bc we just want a clickable spot */
.picture-button {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}

.item-pictures img,
.picture-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--pink-50);
  border: 2px solid var(--pink-300);
  border-radius: 8px;
}

.picture-button:hover img,
.picture-button:hover .picture-placeholder,
.picture-button:focus-visible img,
.picture-button:focus-visible .picture-placeholder {
  border-color: var(--pink-500);
}

.picture-placeholder {
  display: grid;
  place-items: center;
  color: var(--pink-300);
}

.item-pictures figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--pink-500);
}

/* text */
.item-text {
  padding: 12px 16px;
  background: var(--pink-50);
  color: var(--pink-300);
  border: 2px solid var(--pink-300);
  border-radius: 8px;
  line-height: 1.6;
}

.item-text p {
  margin: 0 0 1em;
}

.item-text p:last-child {
  margin-bottom: 0;
}

/* ---------- picture viewer ---------- */

#lightbox {
  width: min(1000px, 94vw);
  max-width: none;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  overflow: visible;
}

#lightbox::backdrop {
  background: rgba(94, 42, 62, 0.6);
}

/* arrows on the sides, picture in the middle */
.lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

.lightbox-image {
  display: grid;
  place-items: center;
  min-width: 0;
}

.lightbox-image img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  background: var(--pink-50);
  border: 2px solid var(--pink-300);
  border-radius: 8px;
}

/* placeholders size, this is just to help it look less weird before you put smthn in */
.lightbox-image .picture-placeholder {
  width: min(600px, 100%);
}

.lightbox-arrow {
  padding: 12px 10px;
  background: var(--pink-50);
  border: 2px solid var(--pink-300);
  border-radius: 8px;
  color: var(--pink-500);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.lightbox-arrow:hover,
.lightbox-arrow:focus-visible {
  border-color: var(--pink-500);
  color: var(--pink-700);
}
