/* vendorplus-media.css — jQuery dropzone, media files grid, image containers, upload progress, set-default icon, upload status, media options popup, delete prompt, processing state, featured/AI file icons, file list/items, ghost items, file move handle */

/* JQUERY UPLOAD DROPZONE */
#dropzone {
  text-align: center;
  font-size: 3rem;
  position: relative;
  margin-bottom: 1rem;
}
@media(min-width: 450px) {
  #dropzone {
    padding: 0;
    background: #eee;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    width: 100%;
    height: 15.625rem;
    line-height: 15.625rem;
    text-align: center;
    font-weight: bold;
    font-size: 4rem;
  }
}
@media (max-width: 449px) {
  #dropzone .fileinput-container {
    transform: scale(0.8);
  }
}
#dropzone .fileinput-container {
  display: flex;
  height: 100%;
  justify-content: center;
  align-items: center;
}
#dropzone .fileinput-button {
  color: #0073aa;
  display: block;
}
#dropzone .fileinput-button.disabled {
  vertical-align: top;
  color: #ccc;
}
#dropzone.hover {
  background: #d9edf3;
}
#dropzone.fade {
  transition: all 0.3s ease-out;
  opacity: 1;
}

.file-upload--hidden {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  cursor: pointer;
  top: 0;
  left: 0;
}

.file-upload--hidden + .fal {
  transition: all 0.3s ease-out;
}
.file-upload--hidden:hover + .fal {
  color: var(--bs-primary);
  transform: scale(1.1);
}

.progress {
  --bs-progress-height: 1rem;
  --bs-progress-font-size: var(--bs-body-font-size-sm);
  --bs-progress-bg: #e9ecef;
  --bs-progress-border-radius: 0.375rem;
  --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  --bs-progress-bar-color: #fff;
  --bs-progress-bar-bg: #0d6efd;
  --bs-progress-bar-transition: width 0.6s ease;
  display: flex;
  height: var(--bs-progress-height);
  overflow: hidden;
  font-size: var(--bs-progress-font-size);
  background-color: var(--bs-progress-bg);
  border-radius: var(--bs-progress-border-radius);
}

.progress .progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: var(--bs-progress-bar-color);
  text-align: center;
  white-space: nowrap;
  background-color: var(--bs-progress-bar-bg);
  transition: var(--bs-progress-bar-transition);
}

.progress.hidden {
  display: none;
}

/* MEDIA OPTIONS */
.vplus-media-files {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 576px) {
  .vplus-media-files {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .vplus-media-files {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 992px) {
  .vplus-media-files {
    grid-template-columns: repeat(8, 1fr);
  }
}
.vplus-media-option.disabled.disabled {
  color: #ccc;
}
.attachment-container:nth-child(even) .file-item {
  background-color: #eee;
}
.vplus-media-files .image-box {
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  height: 100%;
  overflow: hidden;
}
.vplus-media-files .file-item {
  padding: 0.625rem;
}
.vplus-media-files .file-radio {
  cursor: pointer;
}
.vplus-media-files .image-box .preview-link {
  left: -0.3125rem;
}
.vplus-media-files .file-item .file-date {
  position: absolute;
  right: 6.25rem;
  text-align: right;
}
.vplus-media-files .file-item .log-link {
  right: 3.125rem;
  top: 0.25rem;
  padding: 0.3125rem;
}
.vplus-media-files .file-item .delete-link {
  top: 0.25rem;
  right: 0.625rem;
}
.vplus-media-files .file-item .delete-yes {
  top: 0.25rem;
  right: 3.125rem;
  padding: 0.3125rem;
}
.vplus-media-files .image-box .delete-yes {
  top: 50%;
  left: 50%;
  font-size: 4em;
  margin-left: -2.375rem;
  margin-top: -2.375rem;
  padding: 0.625rem;
}
.vplus-media-files .image-box .message-box {
  text-align: center;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 100;
  opacity: 0.85;
}
.vplus-media-files .image-box .message-box .text-danger {
  background: #a94442;
  color: #fff;
}
.vplus-media-files .image-box .photo img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}
.vplus-media-files .file-item .icon {
  margin: 0 0 0 0.3125rem;
}
.vplus-media-files .image-box .file-name {
  position: absolute;
  bottom: 0;
  text-align: center;
  font-size: var(--bs-body-font-size);
  line-height: 1;
  width: 100%;
  padding: 0.9375rem 0.3125rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.vplus-media-files .image-box .vplus-set-default {
  position: absolute;
  bottom: 0.3125rem;
  right: 0.3125rem;
  z-index: 99;
}

.vplus-image-container {
  border-radius: 0.5rem;
}
.vplus-image-container[data-deleted="true"] .vplus-media-option .delete-state {
  display: none;
}
.vplus-image-container[data-deleted="false"]
  .vplus-media-option
  .un-delete-state {
  display: none;
}
.vplus-image-container[data-deleted="true"] .photo img {
  opacity: 0.5;
  transition: opacity 0.25s ease-in;
}
.vplus-primary-image {
  position: absolute;
  top: 1px;
  margin-left: 1px;
  font-size: 1.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.3125rem 0;
}

.vplus-set-default .vplus-check-bg {
  color: #fff;
}
.vplus-set-default .vplus-check-border {
  color: #000;
}
.vplus-set-default .vplus-check {
  color: #ccc;
}
.vplus-set-default.vplus-checked .vplus-check-border {
  color: gold;
}
.vplus-set-default.vplus-checked .vplus-check-bg {
  color: #e08e20;
}
.vplus-set-default.vplus-checked .vplus-check {
  color: gold;
  display: inline-block;
}

.vplus-upload-status {
  display: none;
  margin-bottom: 1rem;
  font-weight: bold;
  font-size: var(--bs-body-font-size-sm);
}

#vplus-video-tabs-content + .vplus-upload-status {
  margin-top: 1rem;
}

.vplus-media-option {
  display: flex;
  pointer-events: none;
  opacity: 0;
  position: absolute;
  bottom: calc(100% - 0.5rem);
  z-index: -1;
  transition: bottom 0.3s ease-in, opacity 0.3s ease-in;
}
.vplus-media-option.show {
  border: 1px solid #eee;
  opacity: 1;
  pointer-events: auto;
  border-radius: 0.3125rem;
  z-index: 100;
  background: #fff;
  bottom: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
}
.vplus-media-option:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0.625rem;
  border-style: solid;
  border-color: #eee transparent transparent transparent;
}
.vplus-media-option:after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0.5rem;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

.vplus-media-option:has(.vplus-delete-prompt.show) > .btn {
  display: none !important;
}

.vplus-delete-prompt {
  display: none;
}
.vplus-delete-prompt.show {
  display: flex;
  width: 100%;
  justify-content: space-around;
  align-items: stretch;
  height: 2.375rem;
}

.vplus-file-container {
  position: relative;
}
.vplus-file-container.selected .image-box {
  box-shadow: 0px 0px 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}
.vplus-file-container.selected .image-box .photo {
  opacity: 0.75;
}
.vplus-file-container.already-synced .image-box {
  border-color: var(--bs-teal);
}
.vplus-file-container.to-be-synced .image-box {
  border-color: var(--bs-blue);
}
.vplus-file-container .vplus-cloud-check {
  color: var(--bs-teal);
  border-color: var(--bs-teal);
}
.vplus-file-container .vplus-cloud-upload {
  color: var(--bs-blue);
  border-color: var(--bs-blue);
}
.vplus-file-container [class^="vplus-cloud-"] {
  position: absolute;
  right: -0.5rem;
  bottom: calc(100% - 1rem);
  border: 1px solid;
  border-radius: 50%;
  background: #fff;
  padding: 0.375rem 0.25rem;
  box-shadow: 1px 2px 0.3125rem rgba(0, 0, 0, 0.1);
}
.vplus-file-item .vplus-delete-prompt.show .processing {
  padding: 0.5rem;
}
.vplus-file-item .vplus-delete-prompt.show {
  width: auto;
  right: 0;
  border-radius: var(--bs-border-radius);
}
.vplus-file-item .vplus-delete-prompt .delete-no {
  order: 2;
}
.vplus-delete-prompt .text {
  font-size: var(--bs-body-font-size);
  white-space: nowrap;
}
.vplus-delete-prompt .btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.vplus-delete-prompt .btn span {
  line-height: 1;
}
.vplus-delete-prompt .delete-no {
  color: var(--bs-dark);
}
.vplus-delete-prompt .delete-yes {
  color: var(--bs-danger);
}
.processing {
  display: none;
  gap: 0.25rem;
  padding: 0.5rem;
  min-height: 2.375rem;
  align-items: center;
}
.processing.show {
  display: flex;
}
.processing.show ~ .btn-link {
  display: none;
}

.vplus-featured-image-icon {
  position: absolute;
  z-index: 50;
  color: #ffa500;
  font-size: 1.5rem;
  bottom: calc(100% - 0.5rem);
  line-height: 1rem;
  left: -0.25rem;
  transform: rotate(-15deg);
  text-shadow: 1px 2px 0.3125rem rgba(0, 0, 0, 0.2);
}


a.delete-link {
  color: var(--bs-danger);
}
.ghost-item > div:not(.image-box) {
  display: none;
}
.ghost-item .image-box {
  opacity: 0.5;
  border: 0.125rem dashed #ccc;
}
.ghost-item img {
  opacity: 0;
}

.vplus-file-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vplus-file-item {
  --bs-card-border-width: var(--bs-border-width);
  --bs-card-border-color: var(--bs-border-color-translucent);
  --bs-card-border-radius: var(--bs-border-radius);
  --bs-card-bg: var(--bs-body-bg);
  position: relative;
  display: flex;
  color: var(--bs-body-color);
  background-color: var(--bs-card-bg);
  background-clip: border-box;
  border: var(--bs-card-border-width) solid var(--bs-card-border-color);
  border-radius: var(--bs-card-border-radius);
  align-items: center;
}

.vplus-file-item .vplus-file-name {
  flex: 1 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.vplus-file-item .vplus-file-icon {
  flex: 0 1 auto;
  display: block;
  padding: 1rem;
  color: var(--bs-gray-500);
}
.vplus-file-item .vplus-file-delete {
  flex: 0 1 auto;
  color: var(--bs-gray-800);
}

.vplus-file-wrapper.vplus-file-wrapper:not(:has(.vplus-file-container)) {
  display: none;
}
.vplus-file-container:has(.progress:not(.hidden)) {
  pointer-events: none;
}
.vplus-file-container:has(.progress:not(.hidden)) .btn.btn.vplus-file-move-handle {
  display: none;
}

.vplus-file-container .progress {
  height: 100%;
}

.btn.btn.vplus-file-move-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  border-radius: var(--bs-border-radius) 0 0 0;
  border-bottom: 0;
  border-right: 0;
}

/* ─── Lightbox ─────────────────────────────────────────────────────────────── */

.vplus-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}
.vplus-lightbox.show {
  display: flex;
}
.vplus-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.vplus-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 0.25rem;
}
.vplus-lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}
.vplus-lightbox-close:hover {
  opacity: 0.75;
}
