/* ==========================================
   IN-APP FILE VIEWER MODAL
   ========================================== */
.viewer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.viewer-modal.open {
  display: flex;
}

.viewer-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.viewer-title-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.viewer-filename {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 480px;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewer-btn {
  background: transparent;
  border: none;
  color: #e8eaed;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.viewer-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}

/* IMAGE VIEWER */
.viewer-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.viewer-zoom-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(32, 33, 36, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* PDF VIEWER */
.viewer-pdf-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #525659;
  border-radius: 6px;
}

/* VIDEO / AUDIO VIEWER */
.viewer-video {
  max-width: 85vw;
  max-height: 80vh;
  border-radius: 8px;
  outline: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.viewer-audio-card {
  background: #202124;
  border: 1px solid #3c4043;
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 360px;
}

.viewer-audio-player {
  width: 100%;
  outline: none;
}

/* CODE / TEXT VIEWER */
.viewer-code-card {
  width: 90vw;
  max-width: 960px;
  height: 80vh;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.viewer-code-header {
  padding: 10px 16px;
  background: #252526;
  border-bottom: 1px solid #333;
  font-size: 13px;
  color: #ccc;
  display: flex;
  justify-content: space-between;
}

.viewer-code-content {
  flex: 1;
  padding: 16px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #d4d4d4;
  overflow: auto;
  white-space: pre;
}

/* GENERIC BINARY FILE VIEWER */
.viewer-binary-card {
  background: #202124;
  border: 1px solid #3c4043;
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: white;
  text-align: center;
}
