/**
 * VendorPlus core styles — part 4 of 10: Lot list gallery and the AI panels
 *
 * Split from the single 18,135-line vendor-plus.css. The parts are chained as
 * style dependencies and MUST load in numeric order: rules here are overridden
 * by later parts, and 173 selector pairs in this sheet set the same property
 * twice. Reordering the parts changes computed styles.
 *
 * Do not reorder rules between parts. To verify the split is still faithful:
 *     php vendorplus-core/tests/stylesheet-split-guard-test.php
 *
 * Lines 7040-8503 of the original file.
 */

/* ==========================================================================
   LOT LIST GALLERY AREA - Inherits from .vplus-media-files
   Uses same base styles as content-lot.php photo uploader
   ========================================================================== */

.vplus-lot-gallery-area {
  position: relative;
  z-index: 1;
}

/* Lot list photo files - override grid for panel context */
.vplus-lot-photo-files {
  overflow: visible; /* Allow media options to overflow */
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .vplus-lot-photo-files {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

@media (min-width: 992px) {
  .vplus-lot-photo-files {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Ensure file containers allow overflow for badges */
.vplus-lot-photo-files .vplus-file-container {
  position: relative;
  overflow: visible;
  aspect-ratio: 1;
}

/* Override image-box for lot list */
.vplus-lot-photo-files .image-box {
  overflow: hidden; /* Keep image contained */
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: var(--bs-border-radius-sm);
}

.vplus-lot-photo-files .image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Move handle positioning */
.vplus-lot-photo-files .vplus-file-move-handle {
  position: absolute;
  bottom: 4px;
  right: 4px;
  padding: 0.25rem;
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--bs-border-radius-sm);
  cursor: grab;
  line-height: 1;
  z-index: 10;
}

.vplus-lot-photo-files .vplus-file-move-handle:active {
  cursor: grabbing;
}

/* Featured/Lead photo crown indicator */
.vplus-lot-photo-files .vplus-featured-image-icon {
  position: absolute;
  z-index: 200;
  color: #ffa500;
  font-size: 1rem;
  bottom: calc(100% - 0.5rem);
  line-height: 1rem;
  left: -0.125rem;
  transform: rotate(-15deg);
  text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* AI badge indicator */
.vplus-lot-photo-files .vplus-ai-file-icon {
  display: block; /* Override base display: none */
  position: absolute;
  color: var(--bs-primary);
  z-index: 200;
  font-size: 0.875rem;
  bottom: calc(100% - 0.75rem);
  line-height: 1rem;
  right: -0.25rem;
  border: 1px solid #eee;
  padding: 0.125rem;
  box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  background: #fff;
  pointer-events: none;
}

/* Media options tray - speech bubble popup */
.vplus-lot-photo-files .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;
  left: 50%;
  transform: translateX(-50%);
}

.vplus-lot-photo-files .vplus-media-option.show {
  border: 1px solid #eee;
  opacity: 1;
  pointer-events: auto;
  border-radius: 5px;
  z-index: 300;
  background: #fff;
  bottom: calc(100% + 0.75rem);
}

.vplus-lot-photo-files .vplus-media-option:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #eee transparent transparent transparent;
}

.vplus-lot-photo-files .vplus-media-option:after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

.vplus-lot-photo-files .vplus-file-container.selected .image-box {
  box-shadow: 0px 0px 0 3px rgba(var(--bs-primary-rgb), 0.25);
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}

.vplus-lot-photo-files .vplus-media-option .btn {
  color: #333;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Show AI link in lot list context (hidden by default in base styles) */
.vplus-lot-photo-files .vplus-media-option .ai-link {
  display: block;
}

/* Photo dropzone styling */
.vplus-lot-photo-dropzone {
  margin-top: 0.5rem;
}

.vplus-lot-photo-files .vplus-file-container .vplus-media-option .btn:hover {
  color: var(--bs-primary);
}

.vplus-lot-photo-files
  .vplus-file-container
  .vplus-media-option
  .delete-link:hover {
  color: var(--bs-danger);
}

.vplus-lot-photo-dropzone {
  display: none;
}

.vplus-lot-photo-files:empty + .vplus-lot-photo-dropzone {
  display: block;
}

/* Always show dropzone when there are photos too */
.vplus-lot-photo-files:not(:empty) + .vplus-lot-photo-dropzone {
  display: block;
  margin-top: 0.5rem;
}

/* Photo trigger styling */
.vplus-lot-photo-trigger {
  cursor: pointer;
  background-color: #fff;
}

.vplus-lot-photo-trigger:hover {
  background-color: #f8f9fa;
}

.vplus-lot-photo-input.file-upload--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vplus-lot-photo-dropzone .dropzone-inner {
  border: 2px dashed #dee2e6;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vplus-lot-photo-dropzone .dropzone-inner:hover,
.vplus-lot-photo-dropzone.dragover .dropzone-inner {
  border-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.vplus-lot-upload-status {
  background: var(--bs-info);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: var(--bs-border-radius-sm);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Bulk AI Modal Styles */
.vplus-bulk-ai-log {
  background: #f8f9fa;
  font-family: monospace;
  font-size: 0.8rem;
}

/* Gallery Modal Styles (mirrors vplus-file-upload-field and vplus-media-files) */
#vplus-gallery-modal .vplus-file-upload-field {
  margin-bottom: 1rem;
}

#vplus-gallery-modal .vplus-media-files {
  margin-top: 1rem;
}

#vplus-gallery-modal .vplus-file-container .image-box {
  position: relative;
}

#vplus-gallery-modal .vplus-file-container .image-box .photo img {
  width: 100%;
  height: auto;
  display: block;
}

#vplus-gallery-modal .vplus-file-container .vplus-file-move-handle,
#vplus-gallery-modal .vplus-file-container .vplus-file-delete {
  position: absolute;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

#vplus-gallery-modal .vplus-file-container .vplus-file-move-handle {
  top: 4px;
  left: 4px;
  cursor: grab;
}

#vplus-gallery-modal .vplus-file-container .vplus-file-delete {
  top: 4px;
  right: 4px;
}

#vplus-gallery-modal .vplus-file-container:hover .vplus-file-move-handle,
#vplus-gallery-modal .vplus-file-container:hover .vplus-file-delete {
  opacity: 1;
}

#vplus-gallery-modal .vplus-file-container .vplus-file-delete:hover {
  color: var(--bs-danger);
}

/* CSV Import Styles */
.vplus-csv-preview {
  overflow-x: auto;
}

.vplus-csv-preview .table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

.vplus-csv-preview-table {
  min-width: max-content;
}

.vplus-csv-preview-table th,
.vplus-csv-preview-table td {
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 0.5rem;
  max-width: none;
}

.card {
  --bs-card-border-color: transparent;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.05);
}

.dropdown-menu.dropdown-menu {
  --bs-dropdown-border-color: var(--bs-gray-100);
  box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
}

.pagination {
  --bs-pagination-active-bg: var(--vplus-primary);
  --bs-pagination-active-color: #fff;
  --bs-pagination-active-border-color: var(--vplus-primary);
}

/* Video Upload with Compression */
#vplus-card--videos .nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

#vplus-card--videos .nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: #6c757d;
  font-weight: 500;
}

#vplus-card--videos .nav-tabs .nav-link:hover {
  border-color: transparent;
  color: #495057;
}

#vplus-card--videos .nav-tabs .nav-link.active {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
  background: transparent;
}

/* Lot form — video drop zone. Flex column rather than .text-center + utility
   spacing: FA gives an icon an explicit width, so as a block box it left-
   anchors and text-align on it does nothing (same trap as .fa-inbox below).
   Centring the flex items centres the glyph regardless of that width. */
.vplus-video-droparea {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.25rem 1.5rem;
  border: 2px dashed var(--bs-border-color, #dee2e6);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.vplus-video-droparea__icon {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--bs-secondary-color, #6c757d);
  transition: color 0.2s ease;
}

.vplus-video-droparea__title {
  margin: 0;
  font-weight: 600;
}

.vplus-video-droparea__or,
.vplus-video-droparea__formats {
  margin: 0;
  font-size: 0.875rem;
  color: var(--bs-secondary-color, #6c757d);
}

.vplus-video-droparea__or {
  text-transform: lowercase;
}

.vplus-video-droparea__formats {
  margin-top: 0.25rem;
}

.vplus-video-droparea:hover,
.vplus-video-droparea.is-dragover {
  border-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.vplus-video-droparea:hover .vplus-video-droparea__icon,
.vplus-video-droparea.is-dragover .vplus-video-droparea__icon {
  color: var(--bs-primary);
}

@media (prefers-reduced-motion: reduce) {
  .vplus-video-droparea,
  .vplus-video-droparea__icon {
    transition: none;
  }
}

/* Dark mode: the Bootstrap vars this zone uses are not redefined on this
   theme, so the ground and dashed edge are set explicitly. */
body.vplus-dark-mode .vplus-video-droparea {
  border-color: #3a4553;
  background: rgba(255, 255, 255, 0.02);
}

body.vplus-dark-mode .vplus-video-droparea__icon,
body.vplus-dark-mode .vplus-video-droparea__or,
body.vplus-dark-mode .vplus-video-droparea__formats {
  color: #9aa5b1;
}

body.vplus-dark-mode .vplus-video-droparea:hover,
body.vplus-dark-mode .vplus-video-droparea.is-dragover {
  background-color: rgba(var(--bs-primary-rgb), 0.12);
}

/* Empty-state inbox icons (profile Submissions tab, submission form). The FA
   stylesheet gives the icon an explicit width (~1.25em), so as a d-block box
   it left-anchors — the parent's .text-center can't centre a fixed-width
   block. Auto side margins centre it (measured live: -476px → 0px offset);
   covers all template + JS-built copies. */
.fa-inbox.fa-2x.d-block {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* My Account — company logo preview. A fixed frame with contain-fit so any
   aspect ratio displays whole; without it the box shrink-wraps per image. */
.vplus-company-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 84px;
}
.vplus-company-logo-frame .img-thumbnail {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.vplus-file-item--video {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
}

.vplus-file-item--video .vplus-file-icon {
  font-size: 1.25rem;
  color: #6c757d;
}

.vplus-file-item--video .vplus-file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vplus-file-item--video .vplus-file-link,
.vplus-file-item--video .vplus-file-download,
.vplus-file-item--video .vplus-file-delete {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.vplus-file-item--video .vplus-file-delete {
  color: #dc3545;
}

.vplus-file-item--video .vplus-file-delete:hover {
  color: #fff;
  background-color: #dc3545;
}

/* YouTube field width constraint */
@media (min-width: 768px) {
  #vplus-panel-youtube .vplus-file-upload-field {
    max-width: 500px;
  }
}

/* YouTube preview cards */
.vplus-yt-preview-list {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.vplus-yt-preview-list.show {
  display: flex;
}
.vplus-yt-preview-card {
  position: relative;
  width: 140px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.15s;
}
.vplus-yt-preview-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.vplus-yt-preview-thumb {
  display: block;
  line-height: 0;
  position: relative;
}
.vplus-yt-preview-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.vplus-yt-preview-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.vplus-yt-preview-thumb:hover .vplus-yt-preview-play {
  opacity: 1;
}
.vplus-yt-preview-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s,
    background 0.15s;
  z-index: 2;
}
.vplus-yt-preview-card:hover .vplus-yt-preview-delete {
  opacity: 1;
}
.vplus-yt-preview-delete:hover {
  background: #dc3545;
}

#vplus-video-compression-panel .progress {
  background-color: #e9ecef;
  position: relative;
  overflow: hidden;
}

#vplus-video-compression-panel .progress-bar {
  background-color: var(--bs-primary);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

#vplus-video-compression-panel .card-body {
  position: relative;
}

#vplus-video-compression-panel .card-body > .progress {
  margin-top: 0.5rem;
}

/* ================================
   AI Generation Progress Feedback
   ================================ */

/* Button spin keyframes — used by the CSS-drawn .vplus-btn-spinner ring.
   (The old .vplus-ai-btn-spin icon class is gone: AITimer now renders
   fa-spinner-third with FA's native fa-spin.) */
@keyframes vplus-btn-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.vplus-btn-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: vplus-btn-spin 0.75s linear infinite;
  vertical-align: -0.125em;
  margin-right: 0.375rem;
}

.vplus-ai-progress-panel {
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  padding: 1.25rem;
  color: #212529;
  box-shadow: 0 0 24px var(--vplus-ai-accent-glow);
}

/* Branded orb (replaces the cyan fa-brain) with a gentle breathe. */
.vplus-ai-header-orb {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px var(--vplus-ai-accent-glow));
  animation: vplus-ai-orb-breathe 3s ease-in-out infinite;
}

@keyframes vplus-ai-orb-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vplus-ai-header-orb {
    animation: none;
  }
}

.vplus-ai-progress-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vplus-ai-progress-header .vplus-ai-header-icon {
  font-size: 1.5rem;
  color: var(--vplus-ai-accent);
  filter: drop-shadow(0 0 8px var(--vplus-ai-accent-glow));
}

.vplus-ai-progress-header .vplus-ai-progress-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--vplus-primary);
}

.vplus-ai-progress-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vplus-ai-stage-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(26, 127, 255, 0.08);
  border-radius: 8px;
  border-left: 3px solid var(--vplus-ai-accent);
}

.vplus-ai-stage-wrapper .vplus-ai-stage-spinner {
  font-size: 1rem;
  color: var(--vplus-ai-accent);
}

.vplus-ai-stage-wrapper .vplus-ai-stage-text {
  font-size: 0.9rem;
  color: inherit;
}

.vplus-ai-progress-bar-wrapper {
  padding: 0;
}

.vplus-ai-progress-bar {
  height: 6px;
  background: rgba(26, 127, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.vplus-ai-progress-fill {
  height: 100%;
  background: var(--vplus-ai-accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
}

.vplus-ai-thinking-text {
  font-size: 0.85rem;
  color: #6c757d;
  padding-left: 0.25rem;
}

.vplus-ai-token-counter {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
  padding-left: 0.25rem;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
}

.vplus-ai-tokens-generated {
  font-weight: 600;
  color: var(--vplus-ai-accent);
}

/* Compact AI Progress Panel (submission form variant) */
.vplus-ai-progress-compact {
  padding: 0.85rem 1rem;
}
.vplus-ai-progress-compact .vplus-ai-progress-header {
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
}
.vplus-ai-progress-compact .vplus-ai-header-icon {
  font-size: 1.15rem;
}
.vplus-ai-progress-compact .vplus-ai-progress-title {
  font-size: 0.9rem;
}
.vplus-ai-progress-compact .vplus-ai-stage-text {
  font-size: 0.8rem;
}
.vplus-ai-progress-compact .vplus-ai-thinking-text {
  font-size: 0.78rem;
}

/* Consignment Submission AI Progress Panel */
.vplus-consignment-ai-progress-panel {
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  padding: 0.95rem 1rem;
  color: #212529;
  box-shadow: 0 0 20px var(--vplus-ai-accent-glow);
}

.vplus-consignment-ai-progress-panel .vplus-ai-progress-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vplus-consignment-ai-progress-panel .vplus-ai-header-orb {
  width: 22px;
  height: 22px;
}

.vplus-consignment-ai-progress-panel .vplus-ai-progress-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--vplus-primary);
  letter-spacing: 0.01em;
}

.vplus-consignment-ai-progress-panel .vplus-ai-progress-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vplus-consignment-ai-progress-panel .vplus-ai-stage-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  background: rgba(26, 127, 255, 0.08);
  border-left: 3px solid var(--vplus-ai-accent);
  border-radius: 7px;
}

.vplus-consignment-ai-progress-panel .vplus-ai-stage-spinner {
  font-size: 0.95rem;
  color: var(--vplus-ai-accent);
}

.vplus-consignment-ai-progress-panel .vplus-ai-stage-text {
  font-size: 0.82rem;
  color: inherit;
}

.vplus-consignment-ai-progress-panel .vplus-ai-progress-bar {
  height: 10px;
  background: rgba(26, 127, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.vplus-consignment-ai-progress-panel .vplus-ai-progress-fill {
  height: 100%;
  background: var(--vplus-ai-accent);
  border-radius: 999px;
  width: 0%;
  transition: width 0.45s ease;
}

.vplus-consignment-ai-progress-panel .vplus-ai-thinking-text {
  font-size: 0.8rem;
  font-style: normal;
  color: #6c757d;
  padding-left: 0.1rem;
}

/* Dark mode for both AI progress panels. */
body.vplus-dark-mode .vplus-ai-progress-panel,
body.vplus-dark-mode .vplus-consignment-ai-progress-panel {
  background: #242830;
  border-color: #3a3f4a;
  color: #e4e6eb;
}

body.vplus-dark-mode .vplus-ai-progress-header {
  border-bottom-color: #3a3f4a;
}

body.vplus-dark-mode .vplus-ai-progress-panel .vplus-ai-progress-title,
body.vplus-dark-mode
  .vplus-consignment-ai-progress-panel
  .vplus-ai-progress-title {
  color: #e4e6eb;
}

body.vplus-dark-mode .vplus-ai-stage-wrapper,
body.vplus-dark-mode
  .vplus-consignment-ai-progress-panel
  .vplus-ai-stage-wrapper {
  background: rgba(77, 157, 255, 0.12);
}

body.vplus-dark-mode .vplus-ai-thinking-text,
body.vplus-dark-mode .vplus-ai-token-counter {
  color: #a0a6b1;
}

/* Blue Flag Progress Panel */
.vplus-bf-progress-panel .vplus-ai-header-icon {
  color: #3b82f6;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}
.vplus-bf-progress-panel .vplus-ai-stage-wrapper {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
}
.vplus-bf-progress-panel .vplus-bf-stage-spinner {
  font-size: 1rem;
  color: #3b82f6;
}
.vplus-bf-progress-panel .vplus-bf-stage-text {
  font-size: 0.8rem;
  color: #000000;
}
.vplus-bf-progress-panel .vplus-bf-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
}

/* AI-Filled Field Highlight */
.vplus-ai-filled {
  border-color: #d4a017 !important;
  box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.25) !important;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.vplus-ai-filled-label {
  color: #b8860b;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 2px;
}

/* ============================================
   AI Debug Panel Styles (Super Admin Only)
   ============================================ */

.vplus-ai-debug-panel {
  background: #1a1a2e;
  border-radius: 8px;
  border: 1px solid #2d2d44;
  overflow: hidden;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.8rem;
}

.vplus-ai-debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #252540;
  border-bottom: 1px solid #2d2d44;
  color: #f97316;
}

.vplus-ai-debug-title {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vplus-ai-debug-controls {
  display: flex;
  gap: 0.5rem;
}

.vplus-ai-debug-controls .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  color: #a0a0b0;
  border-color: #3d3d54;
  background: transparent;
}

.vplus-ai-debug-controls .btn:hover {
  color: #ffffff;
  border-color: #5d5d74;
  background: #2d2d44;
}

.vplus-ai-debug-content {
  padding: 1rem;
}

.vplus-ai-debug-content.collapsed {
  display: none;
}

.vplus-ai-debug-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #2d2d44;
}

.vplus-ai-debug-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.debug-stat-label {
  font-size: 0.65rem;
  color: #6b6b8a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.debug-stat-value {
  font-size: 0.85rem;
  color: #00d4ff;
  font-weight: 500;
}

.vplus-ai-debug-log {
  max-height: 200px;
  overflow-y: auto;
  background: #12121f;
  border-radius: 4px;
  padding: 0.5rem;
}

.debug-log-entry {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.debug-log-entry:last-child {
  margin-bottom: 0;
}

.debug-timestamp {
  color: #6b6b8a;
  font-size: 0.7rem;
  white-space: nowrap;
}

.debug-message {
  color: #c0c0d0;
  word-break: break-word;
}

.debug-log-info {
  background: rgba(0, 212, 255, 0.05);
}

.debug-log-info .debug-message {
  color: #00d4ff;
}

.debug-log-success {
  background: rgba(34, 197, 94, 0.1);
}

.debug-log-success .debug-message {
  color: #22c55e;
}

.debug-log-warning {
  background: rgba(249, 115, 22, 0.1);
}

.debug-log-warning .debug-message {
  color: #f97316;
}

.debug-log-error {
  background: rgba(239, 68, 68, 0.1);
}

.debug-log-error .debug-message {
  color: #ef4444;
}

.debug-log-request {
  background: rgba(124, 58, 237, 0.1);
}

.debug-log-request .debug-message {
  color: #a78bfa;
}

.debug-log-response {
  background: rgba(34, 197, 94, 0.05);
}

.debug-log-response .debug-message {
  color: #86efac;
}

/* Deprecated classes kept for backwards compatibility */

/* ============================================
   AI Provider/Model Quick Switch Panel
   ============================================ */

.vplus-ai-model-selector {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  width: 100%;
}

.vplus-ai-model-selector .text-muted {
  color: #94a3b8 !important;
}

.vplus-ai-model-selector .form-select {
  background-color: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
  font-size: 0.875rem;
}

.vplus-ai-model-selector .form-select:hover {
  border-color: #64748b;
  background-color: #334155;
}

.vplus-ai-model-selector .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  background-color: #334155;
}

.vplus-ai-model-selector .form-select option {
  background-color: #1e293b;
  color: #e2e8f0;
}

.vplus-ai-provider-model-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  margin-bottom: 0.75rem;
}

.vplus-ai-provider-model-row label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  white-space: nowrap;
}

.vplus-ai-provider-model-row select {
  flex: 1;
  min-width: 140px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
  background-color: #1e293b;
  border: 1px solid #475569;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vplus-ai-provider-model-row select:hover {
  border-color: #64748b;
  background-color: #334155;
}

.vplus-ai-provider-model-row select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.vplus-ai-provider-model-row select option {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 0.5rem;
}

/* AI Timer Display Styles */

.vplus-ai-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #000000;
  background: transparent;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  letter-spacing: 0.025em;
  animation: none;
}

@keyframes timerPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.vplus-ai-timer-complete {
  color: #000000;
  background: transparent;
  animation: none;
}

.vplus-ai-timer-complete::before {
  content: "✓ ";
  font-size: 0.7rem;
  color: #000000;
}

/* Timer icon */
.vplus-ai-timer i {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* ============================================
   Advanced Prompt Options Section
   ============================================ */

/* Collapse button styling */
.vplus-ai-advanced-options .btn-link {
  text-decoration: none;
  font-size: 0.85rem;
}

.vplus-ai-advanced-options .btn-link:hover {
  text-decoration: none;
  color: var(--bs-primary) !important;
}

/* Chevron icon rotation on collapse toggle */
.vplus-ai-advanced-options .vplus-collapse-icon {
  transition: transform 0.2s ease;
  font-size: 0.7rem;
}

.vplus-ai-advanced-options [aria-expanded="true"] .vplus-collapse-icon {
  transform: rotate(90deg);
}

/* Card styling for collapsed content */
.vplus-ai-advanced-options .card-body {
  padding: 0.75rem;
  font-size: 0.875rem;
}

/* Description Format Buttons */
#vplus-ai-desc-format-buttons .vplus-desc-format-btn {
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

#vplus-ai-desc-format-buttons .vplus-desc-format-btn.active {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* Title Element Tags */
.vplus-title-element-btn {
  transition: all 0.15s ease;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.vplus-title-element-btn.selected {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.vplus-title-element-btn.selected:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Selected title elements (sortable area) */
#vplus-ai-selected-title-elements {
  min-height: 32px;
  background: #f8f9fa;
  border-radius: 0.25rem;
  padding: 0.25rem;
}

#vplus-ai-selected-title-elements .vplus-title-element-tag {
  background: var(--bs-primary);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  cursor: grab;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#vplus-ai-selected-title-elements .vplus-title-element-tag .remove-tag {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.7rem;
}

#vplus-ai-selected-title-elements .vplus-title-element-tag .remove-tag:hover {
  opacity: 1;
}

#vplus-ai-selected-title-elements .vplus-title-element-tag.sortable-ghost {
  opacity: 0.5;
}

/* Add New Prompt option in select */
#vplus-ai-prompts option[value="__add_new__"] {
  font-weight: 600;
  color: var(--bs-primary);
}

/* Web Source Highlighting - AI Content */
.vplus-web-sourced {
  background-color: rgba(255, 235, 59, 0.25);
  border-bottom: 2px dotted rgba(255, 193, 7, 0.7);
  padding: 0 2px;
  border-radius: 2px;
  cursor: help;
  position: relative;
}

.vplus-web-sourced:hover {
  background-color: rgba(255, 235, 59, 0.4);
  border-bottom-color: rgba(255, 193, 7, 1);
}

/* Quill editor integration for web-sourced content */
.ql-editor .vplus-web-sourced {
  background-color: rgba(255, 235, 59, 0.25);
  border-bottom: 2px dotted rgba(255, 193, 7, 0.7);
}

.ql-editor .vplus-web-sourced:hover {
  background-color: rgba(255, 235, 59, 0.4);
}

/* Print styles - show as subtle underline */
@media print {
  .vplus-web-sourced {
    background-color: transparent;
    border-bottom: 1px solid #ccc;
  }
}

/* Web Citation Superscripts */
.vplus-web-citation {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
}

.vplus-web-citation a {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 600;
}

.vplus-web-citation a:hover {
  text-decoration: underline;
}

/* Sources list at end of description */
.vplus-web-sources {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-gray-300);
  font-size: 0.875rem;
  color: var(--bs-gray-600);
}

.vplus-web-sources sup {
  margin-right: 0.25rem;
}

.vplus-web-sources sup a {
  color: var(--bs-primary);
  text-decoration: none;
}

.vplus-web-sources sup a:hover {
  text-decoration: underline;
}

/* Quill editor integration for citations */
.ql-editor .vplus-web-citation a {
  color: var(--bs-primary);
}

.ql-editor .vplus-web-sources {
  border-top: 1px solid #e0e0e0;
}

/* ==========================================================================
   BULK AI ANALYSIS - Sticky Button
   ========================================================================== */

.vplus-bulk-ai-wrapper {
  position: relative;
}

.vplus-bulk-ai-wrapper.is-sticky {
  position: fixed;
  top: 100px;
  right: 30px;
  z-index: 1000;
}

.vplus-bulk-ai-wrapper.is-sticky #vplus-bulk-ai-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: vplusStickySlideIn 0.3s ease-out;
}

@keyframes vplusStickySlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Only apply sticky on Desktop and Tablet */
@media (max-width: 767.98px) {
  .vplus-bulk-ai-wrapper.is-sticky {
    position: relative;
    top: auto;
    right: auto;
  }

  .vplus-bulk-ai-wrapper.is-sticky #vplus-bulk-ai-btn {
    box-shadow: none;
    animation: none;
  }
}
