/* Admin Employee View — info bar, files, inline preview */

/* ── Info bar ──────────────────────────────────────────────────────────────── */

.aev-info-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.aev-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.aev-info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.aev-info-value {
  font-size: 15px;
  font-weight: 600;
}

.aev-file-actions svg,
.aev-file-delete svg {
  display: block;
}

/* ── Upload button ─────────────────────────────────────────────────────────── */

.aev-upload-btn {
  cursor: pointer;
}

/* ── Files card ────────────────────────────────────────────────────────────── */

.aev-files-card {
  margin-bottom: 16px;
}

.aev-files-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.aev-files-title {
  font-weight: 600;
  font-size: 14px;
}

.aev-files-list {
  max-height: 300px;
  overflow-y: auto;
}

.aev-files-empty {
  padding: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.aev-file-row {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.aev-file-row:last-child {
  border-bottom: none;
}

.aev-file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

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

.aev-file-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aev-file-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.aev-file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.aev-file-actions .btn-sm {
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
}

.aev-file-delete {
  background: transparent;
  border: 1px solid var(--danger, #dc3545);
  color: var(--danger, #dc3545);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.aev-file-delete:hover {
  background: var(--danger, #dc3545);
  color: #fff;
}

.aev-file-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Inline preview ────────────────────────────────────────────────────────── */

#aev-conv-preview {
  margin-top: 8px;
}

.aev-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}

.aev-preview-document {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 32px;
  max-width: 900px;
}

/* ── Print styles for inline preview ───────────────────────────────────────── */

@media print {
  body:has(#aev-conv-preview) > *:not(#root) {
    display: none !important;
  }

  body:has(#aev-conv-preview) #root > *:not(.admin-panel) {
    display: none !important;
  }

  body:has(#aev-conv-preview) .admin-panel > *:not(.ap-content) {
    display: none !important;
  }

  body:has(#aev-conv-preview) .ap-breadcrumb,
  body:has(#aev-conv-preview) .ap-dept-detail-header,
  body:has(#aev-conv-preview) .aev-template-card,
  body:has(#aev-conv-preview) .aev-preview-toolbar {
    display: none !important;
  }

  body:has(#aev-conv-preview) #aev-conv-preview {
    margin: 0;
    padding: 0;
  }

  body:has(#aev-conv-preview) .aev-preview-document {
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
    box-shadow: none;
  }

  @page {
    size: letter portrait;
    margin: 0.5in;
  }
}

/* ── Mobile responsiveness ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .aev-conv-row {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .aev-conv-row-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 4px;
  }

  .aev-preview-document {
    padding: 16px;
  }
}
