/* Video Generator Plugin — Modal Styles v1.0.0 */

.vg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}
.vg-modal[style*="flex"] { display: flex !important; }

.vg-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vg-modal__box {
  position: relative;
  z-index: 1;
  background: #0e0e11;
  border: 1px solid #252530;
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  width: 100%;
  max-width: 620px; /* wider than image modal — video is landscape */
  margin: 16px;
  overflow: hidden;
  animation: vgSlide 0.26s ease;
}
@keyframes vgSlide {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.vg-modal__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #1a1a22;
  background: linear-gradient(135deg, #13101a 0%, #0e0e11 100%);
}
.vg-modal__icon { color: #a07ee0; flex-shrink: 0; }
.vg-modal__title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #e8e8f0;
  letter-spacing: 0.01em;
  font-family: 'DM Sans', sans-serif;
}
.vg-modal__close {
  background: rgba(255,255,255,0.06);
  border: 1px solid #252530;
  color: #888898;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.vg-modal__close:hover { background: rgba(255,255,255,0.1); color: #e8e8f0; }

/* Source image panel */
.vg-modal__source {
  display: none;
  align-items: center;
  gap: 12px;
  margin: 14px 20px 0;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #252530;
  border-radius: 8px;
}
.vg-modal__source-label {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vg-modal__source img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #2a2a35;
  flex-shrink: 0;
}

/* Status */
.vg-modal__status {
  display: none;
  margin: 16px 20px 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
  word-break: break-word;
}
.vg-modal__status--info    { background: rgba(130,100,220,0.12); color: #b0a0f0; border: 1px solid rgba(130,100,220,0.22); }
.vg-modal__status--success { background: rgba(120,200,120,0.10); color: #8fca8f; border: 1px solid rgba(120,200,120,0.20); }
.vg-modal__status--error   { background: rgba(220,80,80,0.10);   color: #e08080; border: 1px solid rgba(220,80,80,0.20);  }

/* Progress */
.vg-modal__progress-track {
  display: none;
  margin: 14px 20px 0;
  height: 3px;
  background: #1a1a22;
  border-radius: 99px;
  overflow: hidden;
}
.vg-modal__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a07ee0, #c8a8ff);
  border-radius: 99px;
  transition: width 1.2s ease;
}

/* Spinner */
.vg-modal__spinner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 36px 20px;
}
.vg-modal__spinner span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #a07ee0;
  animation: vgBounce 1.4s infinite ease-in-out;
}
.vg-modal__spinner span:nth-child(2) { animation-delay: 0.20s; }
.vg-modal__spinner span:nth-child(3) { animation-delay: 0.40s; }
@keyframes vgBounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.4; }
  40%           { transform: scale(1.1);  opacity: 1;   }
}

/* Video preview */
.vg-modal__preview {
  display: none;
  margin: 16px 20px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #252530;
  background: #000;
}
.vg-modal__preview video {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
}

/* Actions */
.vg-modal__actions {
  display: none;
  gap: 10px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.vg-btn {
  flex: 1;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.02em;
}
.vg-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.vg-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.vg-btn--download {
  background: transparent;
  color: #e8e8f0;
  border-color: #2e2e3a;
}
.vg-btn--download:hover:not(:disabled) { background: #1a1a24; border-color: #3a3a4a; }

.vg-btn--publish {
  background: #a07ee0;
  color: #0e0e11;
  border-color: #a07ee0;
  font-weight: 600;
}
.vg-btn--publish:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(160,126,224,0.35);
}

/* Success */
.vg-modal__success {
  display: none;
  margin: 0 20px 20px;
  padding: 14px 16px;
  background: rgba(120,200,120,0.08);
  border: 1px solid rgba(120,200,120,0.18);
  border-radius: 8px;
  text-align: center;
}
.vg-modal__success p {
  margin: 0 0 8px;
  color: #8fca8f;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
}
.vg-gallery-link {
  display: inline-block;
  color: #a07ee0;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  letter-spacing: 0.02em;
}
.vg-gallery-link:hover { color: #c8a8ff; }
