.map-list-modal {
  width: 540px;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.map-list-empty {
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
  padding: 1.5rem 0;
  margin: 0;
}

.map-list-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-right: 2px; /* room for scrollbar */
}

.map-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #141622;
  border: 1px solid #2e3348;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  transition:
    background 0.1s,
    border-color 0.1s;
  outline: none;
}

.map-list-row:hover {
  background: #1a1d2e;
  border-color: #4b5563;
}

.map-list-row.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.map-list-row:focus-visible {
  box-shadow: 0 0 0 2px #6366f1;
}

.map-list-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.map-list-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.map-list-owner {
  font-size: 0.75rem;
  color: #6b7280;
}

.map-access-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.access-private {
  background: rgba(75, 85, 99, 0.3);
  color: #9ca3af;
}
.access-public_view {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.access-public_edit {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.map-fav-badge {
  font-size: 0.68rem;
  color: #f59e0b;
}

.map-list-updated {
  font-size: 0.68rem;
  color: #4b5563;
  margin-left: auto;
}

/* Role badge reused from EditMapModal */
.perm-role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.role-owner {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.role-editor {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
}
.role-viewer {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* ── Row action buttons ── */
.map-list-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.map-action-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.3rem 0.4rem;
  transition:
    color 0.12s,
    border-color 0.12s,
    background 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-action-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border-color: #4b5563;
}

.map-action-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.fav-btn.fav-active {
  color: #f59e0b;
}
.fav-btn.fav-active:hover {
  color: #fbbf24;
}

.copy-btn {
  color: #6b7280;
}
.copied-text {
  color: #34d399;
  font-size: 0.85rem;
}
