.toitap-wizard-gallery-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.625rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.toitap-wizard-gallery-item {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 4.75rem;
}

.toitap-wizard-gallery-item.is-dragging {
  opacity: 0.45;
}

.toitap-wizard-gallery-item.is-drop-target .toitap-wizard-gallery-thumb {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

.toitap-wizard-gallery-thumb {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0;
  background: #f9fafb;
  cursor: zoom-in;
}

.toitap-wizard-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.toitap-wizard-gallery-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 1.25rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #94a3b8;
  cursor: grab;
  touch-action: none;
}

.toitap-wizard-gallery-handle:active {
  cursor: grabbing;
}

.toitap-wizard-gallery-handle svg {
  width: 0.9rem;
  height: 0.9rem;
}

.toitap-wizard-gallery-remove {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid #fecaca;
  border-radius: 9999px;
  background: #fff;
  color: #dc2626;
  box-shadow: 0 1px 4px rgb(15 23 42 / 12%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.toitap-wizard-gallery-item:hover .toitap-wizard-gallery-remove,
.toitap-wizard-gallery-item:focus-within .toitap-wizard-gallery-remove {
  opacity: 1;
}

.toitap-wizard-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(2 6 23 / 88%);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toitap-wizard-gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.toitap-wizard-gallery-lightbox__frame {
  position: relative;
  width: min(92vw, 42rem);
  max-height: 88vh;
}

.toitap-wizard-gallery-lightbox__image {
  display: block;
  width: 100%;
  max-height: 88vh;
  border-radius: 0.75rem;
  object-fit: contain;
  box-shadow: 0 20px 50px rgb(0 0 0 / 40%);
}

.toitap-wizard-gallery-lightbox__close,
.toitap-wizard-gallery-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 9999px;
  background: rgb(15 23 42 / 55%);
  color: #fff;
}

.toitap-wizard-gallery-lightbox__close {
  top: -0.5rem;
  right: -0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.35rem;
  line-height: 1;
}

.toitap-wizard-gallery-lightbox__nav {
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  transform: translateY(-50%);
}

.toitap-wizard-gallery-lightbox__nav svg {
  width: 1.1rem;
  height: 1.1rem;
}

.toitap-wizard-gallery-lightbox__nav--prev {
  left: -0.25rem;
}

.toitap-wizard-gallery-lightbox__nav--next {
  right: -0.25rem;
}
