/* ============================================================
   Upload Confirmation Modal — Theme-Aware Styles
   Automatically inherits current theme via CSS variables.
   ============================================================ */

/* Overlay */
.upload-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ucmFadeIn 0.2s ease;
}

/* Modal box */
.upload-confirm-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 36px 40px 32px;
  max-width: 540px;
  width: 92%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), var(--glow-cyan);
  animation: ucmPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

/* Top accent bar */
.upload-confirm-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--aws-orange));
}

/* Header row */
.ucm-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  text-align: center;
}

.ucm-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm, 8px);
  background: var(--cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--cyan);
  flex-shrink: 0;
}

.ucm-header-text h3 {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 3px 0;
}

.ucm-header-text p {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

/* File info card */
.ucm-file-info {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.ucm-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
}

.ucm-file-row + .ucm-file-row {
  border-top: 1px solid var(--border);
}

.ucm-file-label {
  color: var(--text-dim);
  font-weight: 500;
}

.ucm-file-value {
  color: var(--text-white);
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.ucm-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--cyan-dim);
  color: var(--cyan);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Button row */
.ucm-buttons {
  display: flex;
  gap: 14px;
}

/* Upload button — matches existing .auth-modal-btn.primary / .btn-upgrade pattern */
.ucm-btn-upload {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--aws-orange), #FF6600);
  border: none;
  border-radius: 40px;
  padding: 13px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition, 0.25s ease);
  box-shadow: 0 4px 20px rgba(255, 153, 0, 0.3);
}

.ucm-btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 153, 0, 0.45);
}

.ucm-btn-upload:active {
  transform: translateY(0);
}

/* Cancel button — matches existing .btn-close-popup / .auth-modal-btn.secondary pattern */
.ucm-btn-cancel {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 13px 20px;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition, 0.25s ease);
}

.ucm-btn-cancel:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}

.ucm-btn-cancel:active {
  transform: translateY(0);
}

/* Cancel upload button (during progress) */
.ucm-cancel-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-dim);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 8px 18px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition, 0.25s ease);
  margin-top: 12px;
}

.ucm-cancel-upload-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
  transform: translateY(-1px);
}

.ucm-cancel-upload-btn:active {
  transform: translateY(0);
}

/* ============================================================
   MULTI-FILE UPLOAD PREVIEW MODAL
   ============================================================ */

/* Make modal wider for multi-file */
.upload-confirm-modal.multi-file {
  max-width: 640px;
  padding: 28px 32px 24px;
}

/* File list container */
.ucm-file-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--bg-tertiary);
}

.ucm-file-list::-webkit-scrollbar {
  width: 4px;
}
.ucm-file-list::-webkit-scrollbar-track {
  background: transparent;
}
.ucm-file-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Each file row in list */
.ucm-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  transition: background 0.2s ease;
}

.ucm-file-item + .ucm-file-item {
  border-top: 1px solid var(--border);
}

.ucm-file-item:hover {
  background: rgba(0, 229, 255, 0.04);
}

.ucm-file-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--cyan);
  flex-shrink: 0;
}

.ucm-file-item-info {
  flex: 1;
  min-width: 0;
}

.ucm-file-item-name {
  color: var(--text-white);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.ucm-file-item-meta {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.ucm-file-item-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--cyan-dim);
  color: var(--cyan);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* Remove button */
.ucm-file-remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ucm-file-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

/* Summary row */
.ucm-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 18px;
  font-size: 13px;
}

.ucm-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-white);
  font-weight: 600;
}

.ucm-summary-left i {
  color: var(--cyan);
}

.ucm-summary-right {
  color: var(--text-gray);
  font-weight: 500;
}

/* Upload progress modal */
.ucm-progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ucmFadeIn 0.2s ease;
}

.ucm-progress-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 36px 40px;
  max-width: 460px;
  width: 92%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), var(--glow-cyan);
  animation: ucmPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ucm-progress-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--aws-orange));
}

.ucm-progress-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--cyan);
  margin: 0 auto 16px;
}

.ucm-progress-title {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 4px 0;
}

.ucm-progress-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 20px 0;
}

.ucm-progress-track {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.ucm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #0EA5E9);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.ucm-progress-pct {
  font-size: 12px;
  color: var(--text-gray);
  font-weight: 600;
}

/* Empty state when no files left */
.ucm-empty-msg {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 13px;
}

.ucm-empty-msg i {
  font-size: 28px;
  color: var(--text-gray);
  margin-bottom: 8px;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .upload-confirm-modal { padding: 28px 24px 24px; width: 94%; }
  .upload-confirm-modal.multi-file { max-width: 90%; padding: 24px 20px 20px; }
  .ucm-header { margin-bottom: 20px; }
  .ucm-icon-wrap { width: 44px; height: 44px; font-size: 20px; }
  .ucm-header-text h3 { font-size: 14px; }
  .ucm-file-list { max-height: 200px; }
  .ucm-file-item { padding: 8px 12px; font-size: 12px; }
  .ucm-file-item-icon { width: 28px; height: 28px; font-size: 12px; }
  .ucm-buttons { flex-direction: column; gap: 8px; }
  .ucm-btn-upload, .ucm-btn-cancel { padding: 11px 16px; font-size: 13px; }
  .ucm-progress-modal { padding: 28px 24px; width: 94%; }
  .ucm-progress-title { font-size: 14px; }
  .ucm-summary { flex-direction: column; gap: 6px; text-align: center; padding: 10px 14px; font-size: 12px; }
  .ucm-file-row { font-size: 12px; }
  .ucm-file-value { max-width: 200px; }
}

@media (max-width: 600px) {
  .upload-confirm-modal { padding: 24px 18px 20px; }
  .upload-confirm-modal.multi-file { padding: 20px 14px 16px; }
  .ucm-file-info { padding: 12px 14px; }
  .ucm-file-row { padding: 6px 0; font-size: 11px; }
  .ucm-file-value { max-width: 140px; }
  .ucm-type-badge { font-size: 10px; padding: 2px 8px; }
  .ucm-btn-upload, .ucm-btn-cancel { padding: 10px 14px; font-size: 12px; }
  .ucm-icon-wrap { width: 40px; height: 40px; font-size: 18px; }
  .ucm-header-text h3 { font-size: 13px; }
  .ucm-header-text p { font-size: 11px; }
  .ucm-file-item { padding: 6px 10px; font-size: 11px; }
  .ucm-file-item-name { font-size: 11px; }
  .ucm-file-item-meta { font-size: 10px; }
  .ucm-file-remove { width: 22px; height: 22px; font-size: 10px; }
  .ucm-progress-modal { padding: 24px 18px; }
  .ucm-progress-icon { width: 44px; height: 44px; font-size: 18px; }
}

@media (max-width: 400px) {
  .upload-confirm-modal { padding: 20px 14px 16px; }
  .upload-confirm-modal.multi-file { padding: 16px 10px 14px; }
  .ucm-file-value { max-width: 100px; }
  .ucm-header-text h3 { font-size: 12px; }
  .ucm-summary { font-size: 11px; }
  .ucm-btn-upload, .ucm-btn-cancel { font-size: 11px; padding: 8px 12px; }
  .ucm-progress-modal { padding: 20px 14px; }
}

/* Animations */
@keyframes ucmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ucmPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
