/* Slide In Block - Frontend Styles */

.slide-in-content-wrapper {
  width: 100%;
}

.slide-in-card.slide-in-card-has-link,
.slide-in-card.slide-in-card-has-gallery {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.slide-in-card.slide-in-card-has-gallery:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: -4px;
}

/* Lightbox - shared with gallery block but scoped in its own file so
   slide-in works when the gallery block is not present on the page. */
.socius-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.socius-lightbox .lightbox-content {
  position: relative;
  max-width: 1200px;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.socius-lightbox .lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  z-index: 10;
}

.socius-lightbox .lightbox-close:hover {
  color: #ccc;
}

.socius-lightbox .lightbox-image-container {
  position: relative;
  max-width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.socius-lightbox .lightbox-image {
  /* max-width: calc(100% - 160px); */
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.socius-lightbox.lightbox-single .lightbox-image {
  max-width: 100%;
}

.socius-lightbox .lightbox-caption {
  color: white;
  font-size: 1.125rem;
  text-align: center;
  max-width: 800px;
  padding: 0.5rem;
}

.socius-lightbox .lightbox-nav {
  position: relative;
  flex-shrink: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px;
  color: white;
  border: none;
  width: 4rem;
  height: 4rem;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  opacity: 0.8;
  z-index: 10;
}

.socius-lightbox .lightbox-prev {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0yMCAwIDI0IDQwIiB3aWR0aD0iMjQiIGhlaWdodD0iNDAiPjxnIHRyYW5zZm9ybT0icm90YXRlKDQ1KSI+PHBhdGggZD0ibTAgMGg1djIzaDIzdjVoLTI4eiIgb3BhY2l0eT0iLjQiLz48cGF0aCBkPSJtMSAxaDN2MjNoMjN2M2gtMjZ6IiBmaWxsPSIjZmZmIi8+PC9nPjwvc3ZnPg==");
}

.socius-lightbox .lightbox-next {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii00IDAgMjQgNDAiIHdpZHRoPSIyNCIgaGVpZ2h0PSI0MCI+PGcgdHJhbnNmb3JtPSJyb3RhdGUoNDUpIj48cGF0aCBkPSJtMC0waDI4djI4aC01di0yM2gtMjN6IiBvcGFjaXR5PSIuNCIvPjxwYXRoIGQ9Im0xIDFoMjZ2MjZoLTN2LTIzaC0yM3oiIGZpbGw9IiNmZmYiLz48L2c+PC9zdmc+");
}

.socius-lightbox.lightbox-single .lightbox-nav {
  display: none;
}

.socius-lightbox .lightbox-nav:hover {
  opacity: 1;
}

.socius-lightbox .lightbox-thumbnails {
  display: flex;
  gap: 8px;
  justify-content: center;
  overflow-x: auto;
  padding: 8px 0;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.socius-lightbox .lightbox-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.socius-lightbox .lightbox-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.socius-lightbox .lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.socius-lightbox .lightbox-thumbnail {
  flex-shrink: 0;
  width: 70px;
  height: 50px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
  background: none;
  overflow: hidden;
}

.socius-lightbox .lightbox-thumbnail:hover {
  opacity: 0.8;
}

.socius-lightbox .lightbox-thumbnail.active {
  opacity: 1;
  border-color: white;
}

.socius-lightbox .lightbox-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .socius-lightbox {
    padding: 1rem;
  }

  .socius-lightbox .lightbox-image-container {
    gap: 0;
  }

  .socius-lightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background-size: 18px;
    display: none;
  }

  .socius-lightbox .lightbox-prev {
    left: 0.5rem;
  }

  .socius-lightbox .lightbox-next {
    right: 0.5rem;
  }
}
