/**
 * Adapted Creativity V2
 * Reusable Lightbox dialog and image interaction styles.
 */

.ac-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #101012;
  color: #e4e4e7;
  overflow: hidden;
}
.ac-lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.ac-lightbox::backdrop {
  background: #101012;
}
.ac-lb-bar,
.ac-lb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px max(16px, env(safe-area-inset-left));
}
.ac-lb-bar {
  padding-top: max(12px, env(safe-area-inset-top));
}
.ac-lb-footer {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.ac-lb-counter {
  font-size: 13px;
  color: #a1a1aa;
  white-space: nowrap;
}
.ac-lb-tools {
  display: flex;
  gap: 6px;
}
.ac-lightbox button {
  background: #222226;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  color: #e4e4e7;
  cursor: pointer;
}
.ac-lightbox button:disabled {
  opacity: 0.35;
  cursor: default;
}
.ac-lightbox button:focus-visible {
  outline: 2px solid #e4e4e7;
  outline-offset: 3px;
}
.ac-lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.ac-lb-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
}
.ac-lb-image[hidden] {
  display: none;
}
.ac-lb-zoomed {
  cursor: grab;
}
.ac-lb-zoomed:active {
  cursor: grabbing;
}
.ac-lb-status {
  position: absolute;
  padding: 24px;
  text-align: center;
  color: #a1a1aa;
}
.ac-lb-caption {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: #a1a1aa;
  overflow-wrap: anywhere;
  max-height: 3.6em;
  overflow: auto;
}
@media (max-width: 480px) {
  .ac-lb-bar,
  .ac-lb-footer {
    gap: 8px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .ac-lightbox button {
    padding: 8px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .ac-lightbox[open] {
    animation: ac-lb-enter 100ms ease-out;
  }
  @keyframes ac-lb-enter {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
