/*
 * WayzAway Event Media C2-R4
 */

/*
 * Event Details:
 * preserve every image/video, but lead with the selected
 * video block when persisted coverMediaType=video.
 */
.v-col:has(> .wz-event-detail-videos.wz-cover-video-selected) {
  display: flex !important;
  flex-direction: column !important;
}

.v-col:has(> .wz-event-detail-videos.wz-cover-video-selected)
  > .wz-event-detail-videos.wz-cover-video-selected {
  order: -20 !important;
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}

.v-col:has(> .wz-event-detail-videos.wz-cover-video-selected)
  > .wz-event-detail-image {
  order: -10 !important;
  margin-bottom: 16px !important;
}

/*
 * Video ordering:
 * one pointer interaction model for mouse/touch/pen.
 */
.wz-r2-video-row .wz-r2-drag-handle {
  cursor: grab !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: none !important;
}

.wz-r2-video-row.wz-r2-dragging
  .wz-r2-drag-handle {
  cursor: grabbing !important;
}

.wz-r2-video-row.wz-r2-dragging {
  opacity: 0.72;
}

.wz-r2-video-row.wz-r2-drag-target {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Browser-compatible HEIC preview. */
.wz-r4-heic-inline-preview {
  width: 52px !important;
  height: 52px !important;
  object-fit: cover !important;
  flex: 0 0 52px !important;
  border-radius: 6px !important;
  margin-right: 12px !important;
  vertical-align: middle !important;
}

.wz-r2-image-row img.wz-r4-heic-order-preview {
  display: block !important;
  width: 56px !important;
  height: 56px !important;
  object-fit: cover !important;
}

/*
 * C2-R5 HEIC native VFileUploadItem integration.
 *
 * The decoded JPEG occupies the existing Vuetify prepend avatar.
 * The original generic document icon / unsupported raw HEIC visual
 * is hidden by the runtime before this image is inserted.
 */
.v-file-upload-item
  .v-avatar.wz-r6-heic-avatar {
  position: relative !important;
  overflow: hidden !important;
  background-image: none !important;
}

.v-file-upload-item
  .v-avatar.wz-r6-heic-avatar
  > img.wz-r6-heic-avatar-preview {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.wz-r2-image-row
  img.wz-r6-heic-order-preview {
  display: block !important;
  width: 56px !important;
  height: 56px !important;
  object-fit: cover !important;
}


/*
 * C2-R6:
 * Vuetify may retain its generic document VIcon as a
 * sibling in the prepend slot even after the decoded JPEG
 * has replaced the avatar contents.
 *
 * Scope this suppression only to rows positively identified
 * by the HEIC decoder runtime.
 */
.v-file-upload-item.wz-r6-heic-row
  .v-list-item__prepend
  .v-icon {
  display: none !important;
}

