/**
 * DIGR Video Export Modal Styles
 * Dark theme with neon accents — matches Lab aesthetic
 */

/* ==================== Overlay ==================== */
.vex-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.vex-overlay.vex-visible {
  opacity: 1;
  pointer-events: all;
}

.vex-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 10, 0.85);
  backdrop-filter: blur(8px);
}

/* ==================== Dialog ==================== */
.vex-dialog {
  position: relative;
  background: linear-gradient(160deg, #1a1528 0%, #12101e 100%);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 16px;
  padding: 0;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 0 40px rgba(0, 240, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.vex-visible .vex-dialog {
  transform: translateY(0);
}

/* ==================== Close Button ==================== */
.vex-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.vex-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==================== Header ==================== */
.vex-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 0;
}

.vex-icon {
  font-size: 1.6rem;
}

.vex-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ==================== Preview Canvas ==================== */
.vex-preview {
  position: relative;
  margin: 16px 24px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0a15;
  border: 1px solid rgba(255, 255, 255, 0.06);
  aspect-ratio: 16 / 9;
}

.vex-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.vex-preview-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==================== Body ==================== */
.vex-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== Fields ==================== */
.vex-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vex-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: #8888aa;
  letter-spacing: 0.04em;
  min-width: 80px;
}

.vex-value {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: #bbb;
}

/* ==================== Button Group ==================== */
.vex-btn-group {
  display: flex;
  gap: 6px;
}

.vex-opt {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8888aa;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.vex-opt:hover {
  background: rgba(0, 240, 255, 0.08);
  color: #ccc;
}

.vex-opt.is-active {
  background: rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
}

/* ==================== Checkbox ==================== */
.vex-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: #aaa;
}

.vex-checkbox input {
  display: none;
}

.vex-check-mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.vex-checkbox input:checked + .vex-check-mark {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
}

.vex-checkbox input:checked + .vex-check-mark::after {
  content: '✓';
  color: #00f0ff;
  font-size: 12px;
}

/* ==================== Tier Info ==================== */
.vex-tier-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  flex-wrap: wrap;
}

.vex-tier-info p {
  margin: 0;
  color: #aaa;
}

.vex-tier-free {
  background: rgba(255, 211, 42, 0.06);
  border: 1px solid rgba(255, 211, 42, 0.15);
}

.vex-tier-pro {
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.12);
}

.vex-tier-badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 211, 42, 0.2);
  color: #ffd32a;
}

.vex-badge-pro {
  background: rgba(0, 240, 255, 0.2);
  color: #00f0ff;
}

.vex-upgrade-link {
  width: 100%;
  color: #ffd32a;
  font-size: 0.7rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.vex-upgrade-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ==================== Progress Bar ==================== */
.vex-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vex-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.vex-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #00f0ff, #b537f2, #00f0ff);
  background-size: 200% 100%;
  animation: vex-gradient-shift 2s linear infinite;
  transition: width 0.2s ease;
}

@keyframes vex-gradient-shift {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.vex-progress-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: #8888aa;
  text-align: center;
}

/* ==================== Footer ==================== */
.vex-footer {
  display: flex;
  gap: 10px;
  padding: 0 24px 20px;
  justify-content: flex-end;
}

.vex-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vex-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vex-btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0099cc 100%);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.vex-btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
  transform: translateY(-1px);
}

.vex-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #888;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vex-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #bbb;
}

/* ==================== Trigger Button (in Lab header) ==================== */
.vex-trigger-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.08);
  color: #00f0ff;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.vex-trigger-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  transform: translateY(-1px);
}

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
  .vex-dialog {
    width: 95%;
    max-height: 95vh;
  }

  .vex-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .vex-footer {
    flex-direction: column;
  }

  .vex-btn {
    width: 100%;
    justify-content: center;
  }
}
