/* public/css/mobile/media-modals.css
 * DCM Media tab modals: image lightbox, native-video player, and the
 * XHR upload-progress modal. All colors via existing --dcm-* tokens from
 * dcm.css (which flips for body.dark-mode) — no hardcoded theme hex.
 */

/* ── Shared overlay backdrop ─────────────────────────────────────────────── */

.dcm-media-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
  animation: dcm-media-fade-in 0.18s ease-out;
}

@keyframes dcm-media-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Close button (shared by lightbox + video) — floats top-right of the overlay */
.dcm-media-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.dcm-media-close:active { background: rgba(0, 0, 0, 0.7); }

/* ── Image lightbox ──────────────────────────────────────────────────────── */

.dcm-media-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  max-height: 90svh;
  object-fit: contain;
  border-radius: 6px;
}

/* ── Native video player ─────────────────────────────────────────────────── */

.dcm-media-video {
  max-width: 100%;
  max-height: 90vh;
  max-height: 90svh;
  background: #000;
  border-radius: 6px;
}

/* ── Upload progress modal (card, centered) ──────────────────────────────── */

.dcm-media-modal {
  width: 100%;
  max-width: 420px;
  background: var(--dcm-surface);
  border: 1px solid var(--dcm-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dcm-media-modal__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dcm-text);
}

.dcm-media-modal__file {
  font-size: 13px;
  color: var(--dcm-muted);
  word-break: break-word;
}

.dcm-media-modal__bar {
  width: 100%;
  height: 10px;
  background: var(--dcm-surface-2);
  border-radius: 6px;
  overflow: hidden;
}

.dcm-media-modal__bar-fill {
  height: 100%;
  width: 0;
  background: var(--dcm-accent);
  border-radius: 6px;
  transition: width 0.15s ease-out;
}

.dcm-media-modal__bar-fill--error { background: var(--dcm-danger); }

.dcm-media-modal__stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--dcm-text);
  font-variant-numeric: tabular-nums;
}

.dcm-media-modal__note {
  font-size: 13px;
  color: var(--dcm-danger);
}

.dcm-media-modal__note--stall { color: var(--dcm-muted); }

.dcm-media-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.dcm-media-modal__actions .dcm-btn {
  width: auto;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}
