/* Current Saves mirrors battery/in-game saves in a Free Play Bay-owned IndexedDB store. */
.fpb-rom-actions .fpb-current-saves-library { grid-column: 1 / -1; }
.fpb-current-saves-library {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(49, 215, 200, .3);
  border-radius: 14px;
  background: rgba(5, 31, 36, .54);
  box-sizing: border-box;
}
.fpb-current-saves-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.fpb-current-saves-heading-row > strong {
  color: #eafffd;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fpb-current-saves-count {
  color: #5eead4;
  font-size: .7rem;
  font-weight: 800;
}
.fpb-current-saves-intro {
  margin: 0 0 9px;
  color: #94a3b8;
  font-size: .72rem;
  line-height: 1.35;
}
.fpb-current-saves-list { display: grid; gap: 7px; }
.fpb-current-save-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(49, 215, 200, .28);
  border-radius: 11px;
  background: rgba(4, 22, 29, .82);
  box-sizing: border-box;
}
.fpb-current-save-copy { display: grid; min-width: 0; gap: 2px; }
.fpb-current-save-copy strong,
.fpb-current-save-copy span,
.fpb-current-save-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fpb-current-save-copy strong { color: #eefdfa; font-size: .84rem; line-height: 1.25; }
.fpb-current-save-copy span { color: #9fb7b3; font-size: .69rem; line-height: 1.2; }
.fpb-current-save-copy small { color: #6f9690; font-size: .62rem; line-height: 1.2; }
.fpb-current-save-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 6px;
}
.fpb-current-save-actions .compact {
  width: auto;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 0 9px;
  border-radius: 10px;
  font-size: .68rem;
  white-space: nowrap;
}
.fpb-save-share-placeholder:disabled { opacity: .48; cursor: not-allowed; }
.fpb-current-saves-empty {
  margin: 0;
  padding: 7px 3px 1px;
  color: #94a3b8;
  font-size: .76rem;
  text-align: center;
}
.fpb-current-saves-empty[hidden] { display: none !important; }

.fpb-save-delete-dialog {
  width: min(480px, calc(100% - 24px));
  padding: 0;
  border: 1px solid rgba(248, 113, 113, .34);
  border-radius: 18px;
  background: #0b1422;
  color: var(--text, #f4f7ff);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72);
}
.fpb-save-delete-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.fpb-save-delete-shell { display: grid; gap: 0; }
.fpb-save-delete-copy { padding: 20px; }
.fpb-save-delete-copy h2 { margin: 4px 0 9px; }
.fpb-save-delete-copy p:last-child { margin: 0; color: var(--muted, #9eabc4); line-height: 1.5; }
.fpb-save-delete-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(6, 13, 23, .98);
}
.fpb-save-delete-actions > button { width: 100%; min-height: 44px; }

@media (max-width: 620px) {
  .fpb-current-saves-library { padding: 10px; }
  .fpb-current-save-card { grid-template-columns: 1fr; gap: 8px; }
  .fpb-current-save-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .fpb-current-save-actions .compact { width: 100%; padding-inline: 5px; }
}

/* v35: importable local backups and compact Share/export menu. */
.fpb-current-saves-heading-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.fpb-current-saves-import {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 10px;
  margin: 0;
  font-size: .69rem;
}
.fpb-current-saves-status {
  min-height: 0;
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: .72rem;
  line-height: 1.35;
}
.fpb-current-saves-status:empty { display: none; }
.fpb-current-saves-status[data-tone="success"] { color: #86efac; }
.fpb-current-saves-status[data-tone="error"] { color: #fda4af; }
.fpb-current-saves-status[data-tone="working"] { color: #7dd3fc; }
.fpb-current-save-actions {
  grid-template-columns: repeat(2, auto);
}
.fpb-save-share-menu {
  position: relative;
  min-width: 0;
}
.fpb-save-share-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}
.fpb-save-share-menu > summary::-webkit-details-marker { display: none; }
.fpb-save-share-menu > summary::marker { content: ''; }
.fpb-save-share-popup {
  position: absolute;
  z-index: 40;
  right: 0;
  top: calc(100% + 5px);
  display: grid;
  min-width: 180px;
  padding: 6px;
  border: 1px solid rgba(49, 215, 200, .3);
  border-radius: 11px;
  background: #07151b;
  box-shadow: 0 16px 36px rgba(0,0,0,.46);
}
.fpb-save-share-popup button {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dffbf7;
  text-align: left;
  font: inherit;
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
}
.fpb-save-share-popup button:hover,
.fpb-save-share-popup button:focus-visible { background: rgba(49, 215, 200, .12); outline: none; }
.fpb-save-share-popup button:disabled { color: #66837f; cursor: default; }

@media (max-width: 620px) {
  .fpb-current-saves-heading-copy { display: grid; gap: 1px; }
  .fpb-current-save-actions { grid-template-columns: 1fr 1fr; }
  .fpb-save-share-menu > summary { width: 100%; }
  .fpb-save-share-popup { right: 0; min-width: min(220px, 78vw); }
}
