/*
 Theme Name: Twenty Twenty-Five Child
 Template: twentytwentyfive
*/

/* Gallery Captions */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	color: #000;
	text-shadow: none;
	background: none;
	position: static;
	font-size: var(--wp--preset--font-size--medium);
	padding: 0.5rem;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
	display: none;
}



/* Desktop artwork description sidebar */
.ld-artwork-sidebar {
  position: absolute;
  top: 80px;
  right: 90px;
  bottom: 60px;
  width: 250px;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  z-index: 1000;
  pointer-events: none;

  /* Hidden starting position */
  opacity: 0 !important;
  transform: translateX(100px);

  /* Smooth horizontal slide and fade */
  transition: transform 600ms ease, opacity 600ms ease !important;
}

.ld-artwork-sidebar.is-visible {
  opacity: 1 !important;
  transform: translateX(0);
  pointer-events: auto;
}

.ld-artwork-sidebar__description {
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-line;
}

@media (max-width: 800px) {
  .ld-artwork-sidebar {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ld-artwork-sidebar {
    transition: none;
  }
}

/* Description underneath the existing medium and size caption */
.ld-artwork-description-caption {
  margin-top: 12px;
  padding: 0 0 24px;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  color: inherit;
  white-space: pre-line;
  box-sizing: border-box;
}

.ld-artwork-description-caption[hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .ld-artwork-sidebar {
    display: none !important;
  }
}

@media (min-width: 801px) {
  .ld-artwork-description-caption {
	  display: block;
	  margin-top: 12px;
	  padding: 0;
	  font: inherit;
	  line-height: inherit;
	  color: inherit;
	  white-space: pre-line;
	}
}

/* Mobile expandable artwork details */
.ld-mobile-details {
  display: none;
}

@media (max-width: 800px) {
  .ld-mobile-details {
    display: block;
    margin-top: 8px;
    max-height: 110px;
    overflow-y: auto;
    transition: max-height 350ms ease;
  }

  .ld-mobile-details__preview {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .ld-mobile-details__full {
    display: none;
  }

  .ld-mobile-details.is-expanded {
    max-height: 45vh;
  }

  .ld-mobile-details.is-expanded .ld-mobile-details__preview {
    display: none;
  }

  .ld-mobile-details.is-expanded .ld-mobile-details__full {
    display: block;
  }

  .ld-mobile-details__toggle {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ld-mobile-details {
    transition: none;
  }
}