.pga-user-files { list-style: none; padding: 0; margin: 0; }
.pga-user-files .pga-file { margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; }
.pga-file-name { font-weight: 500; }
.pga-file-created { color: #666; font-size: .9em; }

/* download icon: keep it small and aligned with the text */
.pga-download-icon {
  width: 1.25em; /* about 20px at normal 16px base */
  height: 1.25em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

/* make sure images don't overflow their container */
.pga-file .pga-download-icon img,
.pga-file .pga-download-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* download icon: keep it small and aligned with the text */
.pga-delete-icon {
  width: 1.25em; /* about 20px at normal 16px base */
  height: 1.25em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

/* make sure images don't overflow their container */
.pga-file .pga-delete-icon img,
.pga-file .pga-delete-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* style for the "add credit" link shown when user needs to top-up
   Make it visually prominent (red) and underline on hover for affordance. */
.pga-file-add-credit a {
  color: #c00; /* red */
  text-decoration: none;
}
.pga-file-add-credit a:hover {
  text-decoration: underline;
}

/* Top-up modal styles (used by js/pga-file-download.js) */
.pga-topup-modal-overlay {
  /* Strong, high-specificity rules to avoid theme overrides that push the
     modal to the bottom of the page. Use inset/min-height and !important
     where appropriate so the overlay covers the viewport and centers the box. */
  position: fixed !important;
  inset: 0 !important; /* top:0; right:0; bottom:0; left:0; */
  min-height: 100vh !important;
  background: rgba(0,0,0,0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2147483647 !important; /* very high to avoid stacking issues */
  padding: 20px !important; /* keep a gap on small viewports */
  box-sizing: border-box !important;
}
.pga-topup-modal-box {
  background: #fff;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Cap height so tall content doesn't push the box off-screen; allow scrolling */
  max-height: calc(100vh - 60px);
  overflow: auto;
}
.pga-topup-modal-title {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}
.pga-topup-modal-body {
  margin-bottom: 16px;
  color: #333;
}
.pga-topup-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.pga-topup-modal-btn {
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #cfcfcf; /* visible border so button is not hidden */
  background: #f5f5f5; /* light grey background for default button */
  color: #222; /* dark text for contrast */
  transition: background-color 120ms ease-in-out, color 120ms ease-in-out;
}
.pga-topup-modal-btn:focus { outline: 2px solid #0073aa33; }
.pga-topup-modal-btn:hover { background: #eee; }
.pga-topup-modal-btn-primary {
  background: #0073aa;
  color: #fff;
  border-color: #006799;
}
